[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 30 06:35:21 PDT 2025
================
@@ -5024,3 +5024,9 @@ def OpenACCRoutineDecl :InheritableAttr {
void printPrettyPragma(raw_ostream &OS, const PrintingPolicy &Policy) const;
}];
}
+
+def NonString : InheritableAttr {
+ let Spellings = [GCC<"nonstring">];
----------------
AaronBallman wrote:
We don't typically do that. `GCC` spelling gets `__attribute__((foo))` and `[[gnu::foo]]` while the `Clang` spelling gets you `__attribute__((foo))` and `[[clang::foo]]`, so we usually go with `Clang` when Clang is the first to implement the attribute, and `GCC` when GCC is the first to implement, and only do both spellings in the very unlikely and terrible situation where the semantics are different between the two spellings. We do have `ClangGCC` spelling used by the sanitizers and that suggests we might want to change our policy, but that's orthogonal to this PR.
https://github.com/llvm/llvm-project/pull/137829
More information about the cfe-commits
mailing list