rsmith added a comment.

In https://reviews.llvm.org/D52791#1254559, @rsmith wrote:

>   int *ptr, (a), b, c;
>   


Another possible heuristic for suppressing the check: only warn if there is 
whitespace before the identifier. So:

  int* a, b; // warning
  int *a, b; // no warning



================
Comment at: lib/Sema/SemaStmt.cpp:82-95
+  for (auto *DI : DS->decls()) {
+    VarDecl *VD = dyn_cast<VarDecl>(DI);
+    if (!VD)
+      continue;
+
+    if (!FirstVarDecl) {
+      if (!VD->getType()->isPointerType())
----------------
This is an inappropriate way of performing the check. Instead, you should look 
at the syntactic form of the declarator while parsing it.


https://reviews.llvm.org/D52791



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

Reply via email to