LGTM if a helper (Parser::getManageScopeFlags(bool C99OrCXX, const Token 
&Tok)?) is added for computing flags when making a ParseScope.


================
Comment at: include/clang/AST/MangleNumberingContext.h:36
@@ -34,2 +35,3 @@
     : public RefCountedBase<MangleNumberingContext> {
+  unsigned NumStaticLocals;
   llvm::DenseMap<const Type *, unsigned> ManglingNumbers;
----------------
Is this dead now?

================
Comment at: lib/AST/MangleNumberingContext.cpp:42
@@ +41,3 @@
+MangleNumberingContext::getStaticLocalNumber(const VarDecl *VD) {
+  // FIXME: Compute a BlockPointerType?  Not obvious how.
+  const Type *Ty = 0;
----------------
Is this comment relevant given that we're not taking a BlockDecl?

================
Comment at: lib/Parse/ParseStmt.cpp:1080-1085
@@ -1079,3 +1079,8 @@
   //
-  ParseScope InnerScope(this, Scope::DeclScope,
-                        C99orCXX && Tok.isNot(tok::l_brace));
+  ManageScopeFlags ManageScope = NoScope;
+  if (C99orCXX) {
+    ManageScope = EnteredScope;
+    if (Tok.is(tok::l_brace))
+      ManageScope = BeforeCompoundStmt;
+  }
+  ParseScope InnerScope(this, Scope::DeclScope, ManageScope);
----------------
Can you write a helper that computes these flags in the common case?


http://llvm-reviews.chandlerc.com/D2204
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to