rnk added inline comments.

================
Comment at: lib/AST/DeclCXX.cpp:1497-1505
+  bool IsInNamespace = false;
+  const auto *DeclContext = getDeclContext();
+  while (!DeclContext->isTranslationUnit()) {
+    if (DeclContext->isNamespace()) {
+      IsInNamespace = true;
+      break;
+    }
----------------
This would be nicer factored out as a static helper because it would let you 
early return and avoid the variable and break. You could just fold the call 
into the condition in the `if` below.


https://reviews.llvm.org/D38303



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to