[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-26 Thread Aleksei Sidorin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318998: [ASTImporter] Support TypeTraitExpr (authored by a.sidorin). Changed prior to commit: https://reviews.llvm.org/D39722?vs=124286=124309#toc Repository: rL LLVM

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-26 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. Thank you! https://reviews.llvm.org/D39722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-26 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 124286. tk1012 added a comment. Hello there, I update the diff to follow your comments. https://reviews.llvm.org/D39722 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39722#934783, @aaron.ballman wrote: > In https://reviews.llvm.org/D39722#934781, @tk1012 wrote: > > > Hello Aaron, > > > > I remove the semicolon. > > > > > Is this type actually correct for C++? > > > > Yes, it is. > > clang generates

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In https://reviews.llvm.org/D39722#934781, @tk1012 wrote: > Hello Aaron, > > I remove the semicolon. > > > Is this type actually correct for C++? > > Yes, it is. > clang generates the AST for `declToImport` struct like this. >

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 124232. tk1012 added a comment. Hello Aaron, I remove the semicolon. > Is this type actually correct for C++? Yes, it is. clang generates the AST for `declToImport` struct like this. |-CXXRecordDecl 0x8b19fe0 col:29 implicit struct

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:553 + EXPECT_TRUE(testImport("template struct declToImport {" + " void m() { __is_pod(T); };" + "};" Drop the spurious semicolon

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 124124. tk1012 added a comment. Hello there, I update the diff and add `void f() { declToImport().m(); }` after `declToImport` definition. I leave the matcher for private in the test file, so I don't update the documentation.

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39722#933838, @xazax.hun wrote: > In https://reviews.llvm.org/D39722#933828, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D39722#933699, @a.sidorin wrote: > > > > > Hello Takafumi, > > > > > > This is almost OK to me but

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Oh, sorry! I was thinking that a matcher is still in ASTMatchers.h (in previous revisions it was there). If matcher is internal (current revision), there is no need to update docs. https://reviews.llvm.org/D39722 ___

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D39722#933828, @aaron.ballman wrote: > In https://reviews.llvm.org/D39722#933699, @a.sidorin wrote: > > > Hello Takafumi, > > > > This is almost OK to me but there is an inline comment we need to resolve > > in order to avoid Windows

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39722#933699, @a.sidorin wrote: > Hello Takafumi, > > This is almost OK to me but there is an inline comment we need to resolve in > order to avoid Windows buildbot failures. > In addition, as Gabor pointed, when we add a new matcher,

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Takafumi, This is almost OK to me but there is an inline comment we need to resolve in order to avoid Windows buildbot failures. In addition, as Gabor pointed, when we add a new matcher, we need to update matcher documentation as well. To update the docs, you

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-22 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/AST/ASTImporter.cpp:5622 + SmallVector ToArgVec; + for (auto FromArg : E->getArgs()) { +TypeSourceInfo *ToTI = Importer.Import(FromArg); aaron.ballman wrote: > `const auto *`? By the way, you can replace the

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/AST/ASTImporter.cpp:5622 + SmallVector ToArgVec; + for (auto FromArg : E->getArgs()) { +TypeSourceInfo *ToTI = Importer.Import(FromArg); `const auto *`? Comment at:

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-21 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 123792. tk1012 added a comment. Hello Gábor, Thank you for responding. I move the definition of the mather `typeTraitExpr` into unittests/AST/ASTImporterTest.cpp. I also slightly modify the test code. https://reviews.llvm.org/D39722 Files:

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun requested changes to this revision. xazax.hun added a comment. This revision now requires changes to proceed. The checker documentation should be updated as well. Comment at: include/clang/ASTMatchers/ASTMatchers.h:2251 +// will generate TypeTraitExpr <...> 'int'

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-21 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Aaron, This patch is OK for me but could you please take a look at ASTMatchers changes? https://reviews.llvm.org/D39722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. LGTM, thank you! https://reviews.llvm.org/D39722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 added a comment. Description of the Sema::BuildTypeTrait() Comment at: lib/AST/ASTImporter.cpp:5631 + // Value is always false. + bool ToValue = (!E->isValueDependent()) ? E->getValue() : false; + According to Sema::BuildTypeTrait() in

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 marked 3 inline comments as done. tk1012 added a comment. https://reviews.llvm.org/D39722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 123539. tk1012 added a comment. Herald added a subscriber: rnkovacs. Hello, Aleksei. I'm sorry for the long response time. I update the diff to follow your comments. Updates 1. I apply clang-format -style=llvm to ASTMatchers.h and ASTImporter.cpp. I don't

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-13 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Takafumi, Thank you for this patch! I feel positive about it. You can find my comments inline. Comment at: lib/AST/ASTImporter.cpp:5540 + for(auto FromArg : E->getArgs()) { +TypeSourceInfo *ToTI = Importer.Import(FromArg); +