[cfe-commits] [PATCH] Clang support for MemorySanitizer

Evgeniy Stepanov eugenis at google.com
Fri Nov 30 02:37:27 PST 2012



================
Comment at: llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td:104-107
@@ -103,2 +103,6 @@
   "AddressSanitizer on Android requires '-pie'">;
+def err_drv_tsan_requires_pie : Error<
+  "ThreadSanitizer requires '-pie'">;
+def err_drv_msan_requires_pie : Error<
+  "MemorySanitizer requires '-pie'">;
 def err_drv_unknown_objc_runtime : Error<
----------------
Dmitri Gribenko wrote:
> Chandler Carruth wrote:
> > You don't need two diagnostics:
> > 
> >   def err_drv_sanitizer_requires_pie : Error<
> >     "%select{thread|memory}0 sanitizer requires the '-pie' option">;
> I think it is better to use two diagnostics since %select would require magic numbers in the source.
I also prefer two diagnosticts.

Btw, %select{a|b}0 evaluates to "b" if true, and "a" if false. I find this _really_ weird.



http://llvm-reviews.chandlerc.com/D146



More information about the cfe-commits mailing list