summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.h
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-01-31 22:27:38 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-01-31 22:27:38 +0000
commit35351a95541104b3abbc8698f38d0bad560e9e27 (patch)
tree8344b31c22433ba8b1b282252d62c91ec7c81913 /clang/lib/Sema/Sema.h
parenta682427e42ada5d97d6d3b659c63d3d9ea62a1ae (diff)
downloadbcm5719-llvm-35351a95541104b3abbc8698f38d0bad560e9e27.tar.gz
bcm5719-llvm-35351a95541104b3abbc8698f38d0bad560e9e27.zip
Add VarDecl::isThisDeclarationADefinition(), which properly encapsulates the logic for when a variable declaration is a (possibly tentativ) definition. Add a few functions building on this, and shift C tentative definition handling over to this new functionality. This shift also kills the Sema::TentativeDefinitions map and instead simply stores all declarations in the renamed list. The correct handling for multiple tentative definitions is instead shifted to the final walk of the list.
llvm-svn: 94968
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r--clang/lib/Sema/Sema.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index 7f4806d3050..54d36357be2 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/lib/Sema/Sema.h
@@ -272,14 +272,8 @@ public:
/// not visible.
llvm::DenseMap<DeclarationName, NamedDecl *> LocallyScopedExternalDecls;
- /// \brief The set of tentative declarations seen so far in this
- /// translation unit for which no definition has been seen.
- ///
- /// The tentative declarations are indexed by the name of the
- /// declaration, and only the most recent tentative declaration for
- /// a given variable will be recorded here.
- llvm::DenseMap<DeclarationName, VarDecl *> TentativeDefinitions;
- std::vector<DeclarationName> TentativeDefinitionList;
+ /// \brief All the tentative definitions encountered in the TU.
+ std::vector<VarDecl *> TentativeDefinitions;
struct DelayedDiagnostic {
enum DDKind { Deprecation, Access };
OpenPOWER on IntegriCloud