[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-17 Thread Zequan Wu via Phabricator via cfe-commits
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

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-17 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-16 Thread Zequan Wu via Phabricator via cfe-commits
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

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-16 Thread Zequan Wu via Phabricator via cfe-commits
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:

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-16 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-15 Thread Zequan Wu via Phabricator via cfe-commits
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

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-15 Thread Zequan Wu via Phabricator via cfe-commits
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:

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-15 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
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 > > >

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
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:

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Reid Kleckner via Phabricator via cfe-commits
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

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
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

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
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

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Zequan Wu via Phabricator via cfe-commits
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:

[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.

2020-12-10 Thread Reid Kleckner via Phabricator via cfe-commits
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(); +