[PATCH] D73044: {tablegen] Emit string literals instead of char arrays
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 11:14:49 PST 2020
rnk added inline comments.
================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:652
+ # known to support them (everything but MSVC)
+ add_flag_if_supported("-Wno-overlength-strings" IGNORE_OVERLENGTH_STRINGS)
+
----------------
Instead of this, I would suggest doing this in the generated source:
```
#ifdef __GNUC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverlength-strings"
#endif
...
#ifdef __GNUC
#pragma GCC diagnostic pop
#endif
```
That way, we still benefit from this warning in places where we aren't explicitly taking steps to avoid the problem.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73044/new/
https://reviews.llvm.org/D73044
More information about the llvm-commits
mailing list