aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema/Sema.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-02-19 02:53:41 +0000
committerJohn McCall <rjmccall@apple.com>2011-02-19 02:53:41 +0000
commit15e310a3b970b64a84cb30f0005bc396b4d978cb (patch)
treea07be31cb50547b6d1a6f71a6397f500a58e300d /include/clang/Sema/Sema.h
parent370e6e984cc32167228b66eaf9610c010da0d794 (diff)
Warn about code that uses variables and functions with internal linkage
without defining them. This should be an error, but I'm paranoid about "uses" that end up not actually requiring a definition. I'll revisit later. Also, teach IR generation to not set internal linkage on variable declarations, just for safety's sake. Doing so produces an invalid module if the variable is not ultimately defined. Also, fix several places in the test suite where we were using internal functions without definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/Sema.h')
-rw-r--r--include/clang/Sema/Sema.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index 4e3173ab09..a835bb219e 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -600,6 +600,10 @@ public:
// argument locations.
llvm::DenseMap<ParmVarDecl *,SourceLocation> UnparsedDefaultArgLocs;
+ /// UndefinedInternals - all the used, undefined objects with
+ /// internal linkage in this translation unit.
+ llvm::DenseMap<NamedDecl*, SourceLocation> UndefinedInternals;
+
typedef std::pair<ObjCMethodList, ObjCMethodList> GlobalMethods;
typedef llvm::DenseMap<Selector, GlobalMethods> GlobalMethodPool;