aaron.ballman added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:13340-13342
       }
+      else
+        Diag(FD->getTypeSpecStartLoc(), diag::note_static_for_internal_linkage)
----------------
Formatting here is a bit off -- you should run through clang-format. Also, I'd 
appreciate curly braces even though the `else` clause is technically one line.


================
Comment at: lib/Sema/SemaDecl.cpp:13345-13346
+            << (FD->getStorageClass() == SC_None
+                    ? FixItHint::CreateInsertion(FD->getTypeSpecStartLoc(),
+                                                 "static ")
+                    : FixItHint{});
----------------
We may not want to produce the fixit if there's a macro involved in the 
declaration. Consider:
```
#ifdef SOMETHING
#define FROBBLE static
#else
#define FROBBLE
#endif

FROBBLE void foo(void);
```
We probably don't want the fixit in the case `SOMETHING` is not defined.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59402/new/

https://reviews.llvm.org/D59402



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

Reply via email to