This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfb0f7288051e: [Clang] Make nomerge attribute a function
attribute as well as a statement… (authored by zequanwu).
Repository:
rG LLVM Github
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM! Thank you for this!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92800/new/
https://reviews.llvm.org/D92800
zequanwu added inline comments.
Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:3438-3439
}
+ if (DeclOrStmt)
+DiagList.push_back("statements");
}
aaron.ballman wrote:
> I think this will do the wrong thing when the subject list
zequanwu updated this revision to Diff 312348.
zequanwu marked 2 inline comments as done.
zequanwu added a comment.
address comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92800/new/
https://reviews.llvm.org/D92800
Files:
aaron.ballman added inline comments.
Comment at: clang/include/clang/Basic/Attr.td:1321
let Documentation = [NoMergeDocs];
+ let Subjects = SubjectList<[Function], ErrorDiag>;
+ let SimpleHandler = 1;
Related to my comments in ClangAttrEmitter.cpp, I think
zequanwu added inline comments.
Comment at: clang/test/CodeGen/attr-nomerge.cpp:73
+// CHECK-DAG: attributes #[[ATTR2]] = {{{.*}}nomerge{{.*}}}
+// CHECK-DAG: attributes #[[ATTR3]] = {{{.*}}nomerge{{.*}}}
aaron.ballman wrote:
> Can you also add a test case to
zequanwu updated this revision to Diff 312078.
zequanwu marked 4 inline comments as done.
zequanwu added a comment.
address comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92800/new/
https://reviews.llvm.org/D92800
Files:
aaron.ballman added a comment.
In general, I think this is reasonable -- there's a bit more work to be done
before it's ready to land, but this is heading in the right direction.
Comment at: clang/include/clang/Basic/Attr.td:559
+/// A attribute is either a declaration
zequanwu added inline comments.
Comment at: clang/test/CodeGen/attr-nomerge.cpp:17
+
+[[clang::nomerge]] bool bar() {
+ return true;
rnk wrote:
> zequanwu wrote:
> > rnk wrote:
> > > I would leave this declaration as it was, so that all the statement
> > >
zequanwu updated this revision to Diff 311062.
zequanwu marked an inline comment as done.
zequanwu added a comment.
Add docs.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92800/new/
https://reviews.llvm.org/D92800
Files:
rnk added inline comments.
Comment at: clang/test/CodeGen/attr-nomerge.cpp:8
+ [[clang::nomerge]] void f();
+ [[clang::nomerge]] virtual void g();
+ [[clang::nomerge]] static void f1();
zequanwu wrote:
> rnk wrote:
> > Hm, virtual functions, there's something
zequanwu added inline comments.
Comment at: clang/test/CodeGen/attr-nomerge.cpp:17
+
+[[clang::nomerge]] bool bar() {
+ return true;
rnk wrote:
> I would leave this declaration as it was, so that all the statement attribute
> test cases you wrote below remain
zequanwu added inline comments.
Comment at: clang/test/CodeGen/attr-nomerge.cpp:8
+ [[clang::nomerge]] void f();
+ [[clang::nomerge]] virtual void g();
+ [[clang::nomerge]] static void f1();
rnk wrote:
> Hm, virtual functions, there's something worth thinking
zequanwu updated this revision to Diff 311042.
zequanwu marked an inline comment as done.
zequanwu added a comment.
Add test for virutal function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92800/new/
https://reviews.llvm.org/D92800
Files:
rnk added a comment.
Nice, that wasn't too difficult. I had some suggestions for improving the test
case, and I'd like to hear from Aaron.
Comment at: clang/test/CodeGen/attr-nomerge.cpp:8
+ [[clang::nomerge]] void f();
+ [[clang::nomerge]] virtual void g();
+
15 matches
Mail list logo