[PATCH] D58586: Clear TimerGroup to avoid redundant profile results

2019-02-23 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 created this revision. tk1012 added a project: clang. Herald added a subscriber: cfe-commits. This patch clears out all timers just after printing all timers. Repository: rC Clang https://reviews.llvm.org/D58586 Files: clang/tools/driver/cc1_main.cpp clang/tools/driver/cc1as_main.

[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 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 declToImport `-CXXMe

[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. https://reviews.llvm.org/D3972

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-23 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 124057. tk1012 added a comment. Hello there, I update the diff, reflecting the comments. Updates: 1. Use ImportContainerChecked() for importing TypeSourceInfo. 2. Modify `bool ToValue = (...) ? ... : false;`. 3. Add a test case for the value-dependent `TypeT

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-21 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 added a comment. Hello Aleksei, Unfortunately, I find the related problem with the unnamed structs/unions, even if I apply https://reviews.llvm.org/D39886. For example, in PostgreSQL, there is a part of code like below. typedef struct { int a; } b; struct { const char *x; } y;

[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: lib/AST/ASTIm

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-21 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 added a comment. Oh, yes. https://reviews.llvm.org/D30876 is motivated by the same problem. The notable difference between this patch and https://reviews.llvm.org/D30876 is that ASTImporter should check the conflict resolution for the unnamed structs/unions in a record context or not. T

[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 lib/Sema/SemaExp

[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 a

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 added inline comments. Comment at: lib/AST/ASTImporter.cpp:1665 // they occur in the same location in the context records. if (Optional Index1 = StructuralEquivalenceContext::findUntaggedStructOrUnionIndex( Anonymou

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

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

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-19 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 123493. tk1012 added a comment. Herald added a subscriber: rnkovacs. Hello, I update the diff to solve the below thing. > 1. Are import conflicts for anonymous structures resolved correctly? Before I describe the updates, I want to detail the difference betw

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-13 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 added a comment. Hallo Aleksei and Gábor, Thank you for your response. > 1. Are import conflicts for anonymous structures resolved correctly? In fact, this patch only fixes the unnamed structures that are not anonymous. In https://reviews.llvm.org/D39886#923188, @tk1012 wrote: > I ad

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-13 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 added a comment. Comment at: lib/AST/ASTImporter.cpp:1634 RecordDecl *PrevDecl = nullptr; - if (!DC->isFunctionOrMethod()) { + if (!DC->isFunctionOrMethod() && SearchName.getAsString() != "") { SmallVector ConflictingDecls; According to includ

[PATCH] D39886: [ASTImporter] Fix wrong conflict detections for unnamed structures

2017-11-09 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 created this revision. This patch fixes wrong conflict detections for unnamed structures. Current ASTImporter mistakenly identifies two different unnamed structs as the same one. This is because ASTImporter checks the name of each RecordDecl for the conflict identification and the both of

[PATCH] D39722: [ASTImporter] Support Import TypeTraitExpr

2017-11-07 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 created this revision. Herald added a subscriber: klimek. This fixes unsupporting of importing TypeTraitExpr in ASTImporter. TypeTraitExpr is caused by "__builtin_types_compatible_p()" that is usually used in the assertion in C code. For example, PostgreSQL uses the builtin function in its