https://github.com/AaronBallman closed
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
@@ -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 t
@@ -5024,3 +5024,9 @@ def OpenACCRoutineDecl :InheritableAttr {
void printPrettyPragma(raw_ostream &OS, const PrintingPolicy &Policy)
const;
}];
}
+
+def NonString : InheritableAttr {
+ let Spellings = [GCC<"nonstring">];
erichkeane wrote:
No interest
https://github.com/erichkeane approved this pull request.
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
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/137829
>From 7ed11d01dfda559f16ee823d6274ada321621466 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Tue, 29 Apr 2025 11:43:53 -0400
Subject: [PATCH 1/4] [C] Add diagnostic + attr for unterminated strings
Thi
@@ -4907,6 +4907,20 @@ void Sema::AddModeAttr(Decl *D, const
AttributeCommonInfo &CI,
D->addAttr(::new (Context) ModeAttr(Context, CI, Name));
}
+static void handleNonStringAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ // This only applies to fields and variable declara
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/137829
>From 7ed11d01dfda559f16ee823d6274ada321621466 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Tue, 29 Apr 2025 11:43:53 -0400
Subject: [PATCH 1/3] [C] Add diagnostic + attr for unterminated strings
Thi
@@ -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 ap
@@ -3804,6 +3804,9 @@ def err_attribute_weakref_without_alias : Error<
"weakref declaration of %0 must also have an alias attribute">;
def err_alias_not_supported_on_darwin : Error <
"aliases are not supported on darwin">;
+def warn_attribute_non_character_array : Warning<
@@ -4907,6 +4907,20 @@ void Sema::AddModeAttr(Decl *D, const
AttributeCommonInfo &CI,
D->addAttr(::new (Context) ModeAttr(Context, CI, Name));
}
+static void handleNonStringAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ // This only applies to fields and variable declara
@@ -3804,6 +3804,9 @@ def err_attribute_weakref_without_alias : Error<
"weakref declaration of %0 must also have an alias attribute">;
def err_alias_not_supported_on_darwin : Error <
"aliases are not supported on darwin">;
+def warn_attribute_non_character_array : Warning<
@@ -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 ap
@@ -4907,6 +4907,20 @@ void Sema::AddModeAttr(Decl *D, const
AttributeCommonInfo &CI,
D->addAttr(::new (Context) ModeAttr(Context, CI, Name));
}
+static void handleNonStringAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ // This only applies to fields and variable declara
@@ -3804,6 +3804,9 @@ def err_attribute_weakref_without_alias : Error<
"weakref declaration of %0 must also have an alias attribute">;
def err_alias_not_supported_on_darwin : Error <
"aliases are not supported on darwin">;
+def warn_attribute_non_character_array : Warning<
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Aaron Ballman (AaronBallman)
Changes
This introduces three things related to intialization like:
char buf[3] = "foo";
where the array does not declare enough space for the null terminator but
otherwise can represent the array contents ex
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/137829
This introduces three things related to intialization like:
char buf[3] = "foo";
where the array does not declare enough space for the null terminator but
otherwise can represent the array contents exactl
16 matches
Mail list logo