[PATCH] D19780: Output OpenCL version in Clang diagnostics

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Fri May 6 12:15:07 PDT 2016


Anastasia added inline comments.

================
Comment at: lib/Parse/ParseDecl.cpp:3519
@@ +3518,3 @@
+                                               / 100);
+        const char *VerSpec = (VerMajor + std::string (".") + VerMinor).c_str();
+        Diag(Tok, DiagID) << VerSpec << PrevSpec << isStorageClass;
----------------
rivanvx wrote:
> Anastasia wrote:
> > I think it will be nicer to use string (not char*) here too.
> Other Spec are const char*, so I did it for consistency. But I don't care either way.
Yes, it will be shorter. StringRef should work too I think.

Thanks!


http://reviews.llvm.org/D19780





More information about the cfe-commits mailing list