================
@@ -8382,6 +8350,11 @@ NamedDecl *Sema::ActOnVariableDeclarator(
 
   emitReadOnlyPlacementAttrWarning(*this, NewVD);
 
+  if (NewVD) {
----------------
erichkeane wrote:

Map inserts can be expensive, and this is a default ignore daignostic, we 
should check the diagnostic is enabled before starting this.

Also, this looks like it is adding on ALL new variable declarators, not just 
condition variables.  This needs to happen somewhere we absolutely know this is 
the condition variable of an 'if'.

https://github.com/llvm/llvm-project/pull/156436
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to