[PATCH] D135690: [ASTMatchers] Add matcher for functions that are effectively inline

2022-10-18 Thread Trass3r via Phabricator via cfe-commits
Trass3r marked 5 inline comments as done. Trass3r added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7787-7788 +/// void f() {} +/// void g(); +/// }; +/// \endcode aaron.ballman wrote: > I think it'd be interesting to show

[PATCH] D135690: [ASTMatchers] Add matcher for functions that are effectively inline

2022-10-17 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. In D135690#3862112 , @aaron.ballman wrote: > Pretty sure that was after `/Zc:inline` (IIRC that existed in MSVC 2015 which > was roughly when I recall we were hitting this). I see, yeah `/Zc:inline` got added slightly earlier:

[PATCH] D135690: [ASTMatchers] Add matcher for functions that are effectively inline

2022-10-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D135690#3858621 , @Trass3r wrote: > In D135690#3858541 , @aaron.ballman > wrote: > >> In D135690#3856863 , @Trass3r >> wrote: >> >>> Di

[PATCH] D135690: [ASTMatchers] Add matcher for functions that are effectively inline

2022-10-14 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. In D135690#3858541 , @aaron.ballman wrote: > In D135690#3856863 , @Trass3r wrote: > >> Didn't realize it has a big cost. Looking inside the `AST_MATCHER` and >> `REGISTER_MATCHER` macros

[PATCH] D135690: [ASTMatchers] Add matcher for functions that are effectively inline

2022-10-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D135690#3856863 , @Trass3r wrote: > In D135690#3852362 , @aaron.ballman > wrote: > >> what's the need for adding this matcher? Do you plan to use it for some >> in-tree needs? W

[PATCH] D135690: [ASTMatchers] Add matcher for functions that are effectively inline

2022-10-13 Thread Trass3r via Phabricator via cfe-commits
Trass3r added a comment. In D135690#3852362 , @aaron.ballman wrote: > what's the need for adding this matcher? Do you plan to use it for some > in-tree needs? We usually only add new matchers where there's an immediate > need for them because of how ex

[PATCH] D135690: [ASTMatchers] Add matcher for functions that are effectively inline

2022-10-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks for the new matcher, can you also add a release note for the addition? One question I have is: what's the need for adding this matcher? Do you plan to use it for some in-tree needs? We usually only add new matchers where there's an immediate need for them b

[PATCH] D135690: [ASTMatchers] Add matcher for functions that are effectively inline

2022-10-11 Thread Trass3r via Phabricator via cfe-commits
Trass3r added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7791 +/// functionDecl(isEffectivelyInline()) will match f(). +AST_MATCHER(FunctionDecl, isEffectivelyInline) { return Node.isInlined(); } + Is there any value in adding vari

[PATCH] D135690: [ASTMatchers] Add matcher for functions that are effectively inline

2022-10-11 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added reviewers: aaron.ballman, njames93, t-rasmud. ziqingluo-90 added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchersMacros.h:96 namespace internal { \ - class matcher_##DefineMatc

[PATCH] D135690: [ASTMatchers] Add matcher for functions that are effectively inline

2022-10-11 Thread Trass3r via Phabricator via cfe-commits
Trass3r created this revision. Trass3r added a reviewer: ziqingluo-90. Herald added a project: All. Trass3r updated this revision to Diff 466881. Trass3r added a comment. Trass3r updated this revision to Diff 466882. Trass3r published this revision for review. Herald added a project: clang. Herald