summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-06-28 08:39:25 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-06-28 08:39:25 +0000
commit2d69ec7a7232aa9fd804c3392650f74a8d65c55d (patch)
treedf74cd13e2630f21c5610b2e83214ad33070db51 /clang/lib/Sema/Sema.h
parent61176897bac13ed98d566b1cc0f8d0451ec3926b (diff)
downloadbcm5719-llvm-2d69ec7a7232aa9fd804c3392650f74a8d65c55d.tar.gz
bcm5719-llvm-2d69ec7a7232aa9fd804c3392650f74a8d65c55d.zip
Partial fix for PR7267 based on comments by John McCall on an earlier patch.
This is more targeted, as it simply provides toggle actions for the parser to turn access checking on and off. We then use these to suppress access checking only while we parse the template-id (included scope specifier) of an explicit instantiation and explicit specialization of a class template. The specialization behavior is an extension, as it seems likely a defect that the standard did not exempt them as it does explicit instantiations. This allows the very common practice of specializing trait classes to work for private, internal types. This doesn't address instantiating or specializing function templates, although those apparently already partially work. The naming and style for the Action layer isn't my favorite, comments and suggestions would be appreciated there. llvm-svn: 106993
Diffstat (limited to 'clang/lib/Sema/Sema.h')
-rw-r--r--clang/lib/Sema/Sema.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index 9d5e290b2f6..fcf5e94149f 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/lib/Sema/Sema.h
@@ -2797,6 +2797,12 @@ public:
void HandleDelayedAccessCheck(DelayedDiagnostic &DD, Decl *Ctx);
+ /// A flag to suppress access checking.
+ bool SuppressAccessChecking;
+
+ void ActOnStartSuppressingAccessChecks();
+ void ActOnStopSuppressingAccessChecks();
+
enum AbstractDiagSelID {
AbstractNone = -1,
AbstractReturnType,
OpenPOWER on IntegriCloud