summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaAccess.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-25 23:44:00 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-25 23:44:00 +0000
commit6b48873d500cba9c278e1c7518fe963918eb6c49 (patch)
tree48b64aa0e24813bdbbdab95c9ef1ba49e36d925b /clang/lib/Sema/SemaAccess.cpp
parentc7fb446a9d5f678d82e7bcb82d66d3d66d529311 (diff)
downloadbcm5719-llvm-6b48873d500cba9c278e1c7518fe963918eb6c49.tar.gz
bcm5719-llvm-6b48873d500cba9c278e1c7518fe963918eb6c49.zip
Pull DelayedDiagnostic and AccessedEntity out into their own header.
This works courtesy of the new SmallVector<..., 0> specialization that doesn't require a complete type. Note that you'll need to pull at least SmallVector.h from LLVM to compile successfully. llvm-svn: 112114
Diffstat (limited to 'clang/lib/Sema/SemaAccess.cpp')
-rw-r--r--clang/lib/Sema/SemaAccess.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaAccess.cpp b/clang/lib/Sema/SemaAccess.cpp
index 965ec66a13e..7cda7dd1729 100644
--- a/clang/lib/Sema/SemaAccess.cpp
+++ b/clang/lib/Sema/SemaAccess.cpp
@@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "clang/Sema/SemaInternal.h"
+#include "clang/Sema/DelayedDiagnostic.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/Lookup.h"
#include "clang/AST/ASTContext.h"
@@ -22,6 +23,7 @@
#include "clang/AST/ExprCXX.h"
using namespace clang;
+using namespace sema;
/// A copy of Sema's enum without AR_delayed.
enum AccessResult {
@@ -132,10 +134,10 @@ struct EffectiveContext {
bool Dependent;
};
-/// Like Sema's AccessedEntity, but kindly lets us scribble all over
+/// Like sema:;AccessedEntity, but kindly lets us scribble all over
/// it.
-struct AccessTarget : public Sema::AccessedEntity {
- AccessTarget(const Sema::AccessedEntity &Entity)
+struct AccessTarget : public AccessedEntity {
+ AccessTarget(const AccessedEntity &Entity)
: AccessedEntity(Entity) {
initialize();
}
@@ -1033,7 +1035,7 @@ static Sema::AccessResult CheckAccess(Sema &S, SourceLocation Loc,
// access control.
if (S.CurContext->isFileContext() && S.ParsingDeclDepth) {
S.DelayedDiagnostics.push_back(
- Sema::DelayedDiagnostic::makeAccess(Loc, Entity));
+ DelayedDiagnostic::makeAccess(Loc, Entity));
return Sema::AR_delayed;
}
OpenPOWER on IntegriCloud