================ @@ -9294,3 +9294,18 @@ Declares that a function potentially allocates heap memory, and prevents any pot of ``nonallocating`` by the compiler. }]; } + +def NonStringDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``nonstring`` attribute can be applied to the declaration of a variable or +a field whose type is a character array to specify that the character array is +not intended to behave like a null-terminated string. This will silence +diagnostics with code like: + +.. code-block:: c + + char BadStr[3] = "foo"; // No space for the null terminator, diagnosed + __attribute__((nonstring)) char NotAStr[3] = "foo"; // Not diagnosed + }]; +} ---------------- AaronBallman wrote:
Fixed https://github.com/llvm/llvm-project/pull/137829 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits