[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-12-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Looks good now, thanks! Repository: rL LLVM https://reviews.llvm.org/D27180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27773: [analyzer] Add checker modeling gtest APIs.

2016-12-21 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Looks good for me, but I'm not a reviewer. Thank you Devin! Comment at: test/Driver/analyzer-target-enabled-checkers.cpp:7 // CHECK-DARWIN: "-analyzer-checker=core" +// CHECK-DARWIN-SAME: "-analyzer-checker=apiModeling" // CHECK-DARWIN-SAME: "-analy

[PATCH] D28023: [analyzer] Fix leak false positives before no-return functions caused by incomplete analyses.

2016-12-21 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Looks useful and mostly good. A small advice is in inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporter.cpp:3294 + // Find the node's current statement in the CFG. + // FIXME: CFG lookup should be made easier. + const CFG &Cfg = N->getC

[PATCH] D28023: [analyzer] Fix leak false positives before no-return functions caused by incomplete analyses.

2016-12-21 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporter.cpp:3363 +// we're post-dominated by. +// FIXME: This is far from enough to handle the incomplete analysis case. +// We may be post-dominated in subsequent blocks, or even ---

[PATCH] D26753: ASTImporter: improve support for C++ templates

2016-12-30 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Kareem, I have re-checked it and I cannot see the failure. But I'm not going to commit it until NY holidays end (and, anyway, I will not commit it if somebody has failing tests). Could you describe your configuration? https://reviews.llvm.org/D26753 __

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-03-15 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Daniel, Your patch looks mostly good to me. I have only minor naming comments. Comment at: lib/StaticAnalyzer/Core/CheckerHelpers.cpp:99 +bool clang::ento::isExprResultConformsComparisonRule(CheckerContext &C, +

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-03-17 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/StaticAnalyzer/Core/CheckerHelpers.cpp:99 +bool clang::ento::isExprResultConformsComparisonRule(CheckerContext &C, + BinaryOperatorKind BOK, +

[PATCH] D27181: [ASTImporter] Support for importing UsingDecl and UsingShadowDecl

2017-04-10 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/AST/ASTImporter.cpp:4305 + DeclarationNameInfo NameInfo(Name, Importer.Import(D->getNameInfo().getLoc())); + ImportDeclarationNameLoc(D->getNameInfo(), NameInfo); + spyffe wrote: > I've seen this pattern before,

[PATCH] D30435: [clang-import-test] Lookup inside entities

2017-04-10 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. Looks excellent now. Thank you Sean! Repository: rL LLVM https://reviews.llvm.org/D30435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-01-21 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Amazing work, Dominic. That's what I wanted to test for long time. But, personally, I'm not happy with massive changes in tests. 1. I don't think that we need to change run line for tests if they pass with both managers. These changes are pretty noisy, 2. If Z3 is opt

[PATCH] D26753: ASTImporter: improve support for C++ templates

2017-01-21 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. I got it. I have hard-coded paths in CHECK-lines so these tests are passed on my machine but not on other. Thank you Kareem! https://reviews.llvm.org/D26753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D26753: ASTImporter: improve support for C++ templates

2017-01-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL292779: ASTImporter: quick test fix (authored by a.sidorin). Changed prior to commit: https://reviews.llvm.org/D26753?vs=79054&id=85332#toc Repository: rL LLVM https://reviews.llvm.org/D26753 Files:

[PATCH] D26753: ASTImporter: improve support for C++ templates

2017-01-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Main revisions: https://reviews.llvm.org/rL292776, https://reviews.llvm.org/rL292778. Sorry for not mentioning them in Differential Revision. Repository: rL LLVM https://reviews.llvm.org/D26753 ___ cfe-commits mailing

[PATCH] D6549: ASTImporter: Propagate implicit flag to imported record and field decls

2017-02-01 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. This should be fixed in r269693. https://reviews.llvm.org/D6549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D6550: ASTImporter: Fix missing SourceLoc imports

2017-02-01 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Gabor. One of the bugs fixed in this patch is still present in master, other two are already fixed. Comment at: lib/AST/ASTImporter.cpp:2749 // Create the imported function. + SourceLocation StartLoc = Importer.Import(D->getInnerLocStart());

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-07 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Artem, Thank you for adding me, I missed this patch. I have few comments below. If you (and Vlad) can wait for two or three days, I will re-check the place I'm worrying about and post the results. Comment at: lib/StaticAnalyzer/Checkers/GenericT

[PATCH] D16403: Add scope information to CFG

2017-07-05 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Oh, I see now. I was wrongly thinking that these patches do the same thing and we're duplicating the work. Thank you very much for your explanation, Devin. Repository: rL LLVM https://reviews.llvm.org/D16403 ___ cfe-co

[PATCH] D35674: [analyzer] Treat C++ throw as sink during CFG-based suppress-on-sink.

2017-07-21 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. Looks good. https://reviews.llvm.org/D35674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D35673: [analyzer] A better CFG-based suppress-on-sink.

2017-07-21 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. Just a minor nit. Comment at: lib/StaticAnalyzer/Core/BugReporter.cpp:3332 + +if (Visited.count(Blk)) { + // We've encountered a loop. We won't see anything ne

[PATCH] D32845: [Analyzer] Iterator Checker - Part 4: Mismatched iterator checker for function parameters

2018-01-16 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Adam, This looks like a nice improvement. I have some remarks inline. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:382 } + } else if (!isa(&Call)) { +// The main purpose of iterators is to abstract away from different --

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-01-16 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Adam. I have a nit inline. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1256 +if (Cond(Reg.second)) { + State = setIteratorPosition(State, Reg.first, Proc(Reg.second)); +} Updating ProgramState is usu

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-01-17 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1256 +if (Cond(Reg.second)) { + State = setIteratorPosition(State, Reg.first, Proc(Reg.second)); +} baloghadamsoftware wrote: > a.sidorin wrote: > > Updating

[PATCH] D42300: [Analyzer] Add PreStmt and PostStmt callbacks for OffsetOfExpr

2018-01-19 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Henry, The patch looks reasonable. I think it can be landed after comments are resolved. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:1497 + ExplodedNodeSet PostVisit; + for (ExplodedNodeSet::iterator i = PreVisit.begin(), e =

[PATCH] D42301: [ASTImporter] Support LambdaExprs and improve template support

2018-01-19 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin created this revision. a.sidorin added reviewers: xazax.hun, szepet, jingham. a.sidorin added a project: clang. Herald added subscribers: rnkovacs, kristof.beyls, aemerson. Also, a number of style and bug fixes was done: - ASTImporterTest: added sanity check for source node - ExternalAS

[PATCH] D42335: [ASTImporter] Supporting CXXOperatorCallExpr, SizeOfPackExpr, DependentTemplateSpecializationType, DependentSizedArray importing.

2018-01-22 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Peter, Thank you for the patch! It is almost LGTM, just a few minor questions inline. Am I understand correctly that it is partially based on https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/AST/ASTImporter.cpp? Also, FYI: you can use ASTMerge and clang

[PATCH] D42301: [ASTImporter] Support LambdaExprs and improve template support

2018-01-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. > I do not see a test for the following changes: > > - ASTImporter: don't add templated declarations into DeclContext It's in ASTImporterTest. It checks that the templated decl cannot be found in the enclosing TU. > - ASTImporter: proper set ParmVarDecls for imported

[PATCH] D42335: [ASTImporter] Supporting CXXOperatorCallExpr, SizeOfPackExpr, DependentTemplateSpecializationType, DependentSizedArray, CXXTypeidExpr importing.

2018-01-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/AST/ASTImporter.cpp:6207 +TypeSourceInfo *TSI = Importer.Import(E->getTypeOperandSourceInfo()); +if (!TSI && E->getTypeOperandSourceInfo()) + return nullptr; As I see from usage of `getTypeOperandSourc

[PATCH] D42301: [ASTImporter] Support LambdaExprs and improve template support

2018-01-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 131279. a.sidorin added a comment. Addressed review comments Repository: rC Clang https://reviews.llvm.org/D42301 Files: lib/AST/ASTImporter.cpp lib/AST/ASTStructuralEquivalence.cpp lib/AST/ExternalASTMerger.cpp test/ASTMerge/class-template/Inp

[PATCH] D42301: [ASTImporter] Support LambdaExprs and improve template support

2018-01-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. In https://reviews.llvm.org/D42301#984695, @xazax.hun wrote: > High level note: `clang::TypeAliasDecl` has the same issue as > `CXXRecordDecl`, so templated versions should not be added to the > DeclContext. Could you add that just for the sake of completeness? I'd

[PATCH] D42335: [ASTImporter] Supporting CXXOperatorCallExpr, SizeOfPackExpr, DependentTemplateSpecializationType, DependentSizedArray, CXXTypeidExpr importing.

2018-01-25 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/D42335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D42301: [ASTImporter] Support LambdaExprs and improve template support

2018-01-25 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Thank you, Gabor. I'll change cast<> to cast_or_null<> to enable the assertion below. Repository: rC Clang https://reviews.llvm.org/D42301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D42301: [ASTImporter] Support LambdaExprs and improve template support

2018-01-26 Thread Aleksei Sidorin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323519: [ASTImporter] Support LambdaExprs and improve template support (authored by a.sidorin, committed by ). Changed prior to commit: https://reviews.llvm.org/D42301?vs=131279&id=131568#toc Repositor

[PATCH] D42645: New simple Checker for mmap calls

2018-01-29 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello David, Do you have any results of this checker on the real code? If yes, could you please share them? There are also some inline comments regarding implementation. Comment at: lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:42 + +void Mma

[PATCH] D42560: [analyzer] dump() ExprEngine's internal traits into the ExplodedGraph view.

2018-01-30 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. More debug info is always good. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:400 +Out << '(' << I.second << ',' << I.first << ") "; +I.first->printPretty(Out, nullptr, PrintingPolicy(LO)); +Out << NL;

[PATCH] D38943: [ASTImporter] import SubStmt of CaseStmt

2018-01-30 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Herald added subscribers: llvm-commits, rnkovacs. Comment at: cfe/trunk/unittests/AST/ASTImporterTest.cpp:100 + // This traverses the AST to catch certain bugs like poorly or not + // implemented subtrees. I just saw this chan

[PATCH] D42645: New simple Checker for mmap calls

2018-02-05 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi David! The patch looks almost OK. Comment at: lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:65 + *BT, "Both PROT_WRITE and PROT_EXEC flags are set. This can " + "lead to exploitable memory regions, which could be overw

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-14 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Sorry for the delay, I have commented inline. For me, this patch looks like a strict improvement. I think, after some clean up this can be accepted. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:442 + +const RecordDecl *RD = RT-

[PATCH] D6550: ASTImporter: Fix missing SourceLoc imports

2017-02-17 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. This patch lacks tests. If you add at least minimal test case (I'm not familiar with ObjC and its front-end, unfortunately), I will no have any concerns. Also adding Sean. https://reviews.llvm.org/D6550 ___ cfe-commits m

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-02-17 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Zoltan. Sorry, I'm a bit busy now. Here are my thoughts about the design. 1. I think we should not add new warnings to GenericTaintChecker. Instead, it is better to move warnings out of it. After that it will become just a plugin used by other checkers. Such sp

[PATCH] D29643: [analyzer] Do not duplicate call graph nodes for function that has definition and forward declaration.

2017-02-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Anna, I will commit. Thank you! https://reviews.llvm.org/D29643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29643: [analyzer] Do not duplicate call graph nodes for function that has definition and forward declaration.

2017-02-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295644: [analyzer] Do not duplicate call graph nodes for functions that have definition… (authored by a.sidorin). Changed prior to commit: https://reviews.llvm.org/D29643?vs=87388&id=89089#toc Reposito

[PATCH] D30534: [analyzer] When creating a temporary object copy, properly copy the value into it.

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Artem! Thank you for this patch. It looks very promising, but I have some questions and remarks. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:187 const Expr *Result) { - SVal V = State->getSVal(Ex,

[PATCH] D28297: [StaticAnalyzer] Fix crash in CastToStructChecker

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Looks like a right fix. Comment at: lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp:93 // Warn when there is widening cast. unsigned ToWidth = Ctx.getTypeInfo(ToPointeeTy).Width; NoQ wrote: > I think we should move the

[PATCH] D30565: [analyzer] Terminate analysis on OpenMP code instead of crashing

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin created this revision. ExprEngine assumes that OpenMP statements should never appear in CFG. However, current CFG doesn't know anything about OpenMP and passes such statements as CFG nodes causing "UNREACHABLE executed!" crashes. Since I have no ideas on OpenMP implementation in ExprE

[PATCH] D30565: [analyzer] Terminate analysis on OpenMP code instead of crashing

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. `git blame` shows that OMP* statements were added to the switch block by different authors while OpenMP support in clang was implemented. Looks like they were put to "Should not appear" section instead of "Unsupported" by mistake. https://reviews.llvm.org/D30565

[PATCH] D30565: [analyzer] Terminate analysis on OpenMP code instead of crashing

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296884: [Analyzer] Terminate analysis on OpenMP code instead of assertion crash (authored by a.sidorin). Changed prior to commit: https://reviews.llvm.org/D30565?vs=90441&id=90499#toc Repository: rL

[PATCH] D30565: [analyzer] Terminate analysis on OpenMP code instead of crashing

2017-03-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Thank you Devin. Should we submit this to 4.0? I guess there are not many users of both CSA and OpenMP but PR you pointed is already the second report about this issue I see. Repository: rL LLVM https://reviews.llvm.org/D30565 __

[PATCH] D30435: [clang-import-test] Lookup inside entities

2017-03-06 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Sean, It is good to have the ability of recursive lookup. But for me (and I'm sorry), the code becomes very hard to understand: I need to track if the Decl/DC is in the source AST or in the AST being imported, if it was imported or if was in the AST before acro

[PATCH] D30798: [analyzer] Turn suppress-c++-stdlib on by default

2017-03-10 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. I have no any objection on this change. Repository: rL LLVM https://reviews.llvm.org/D30798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30831: [ASTImporter] Import fix of GCCAsmStmts w/ missing symbolic operands

2017-03-13 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Zoltan, Thank you for the patch. There is an inline comment. Comment at: lib/AST/ASTImporter.cpp:5221 IdentifierInfo *ToII = Importer.Import(S->getOutputIdentifier(I)); -if (!ToII) - return nullptr; +// ToII is nullptr when no

[PATCH] D30831: [ASTImporter] Import fix of GCCAsmStmts w/ missing symbolic operands

2017-03-13 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. Looks good, thank you! https://reviews.llvm.org/D30831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D26904: [astimporter] Support importing CXXDependentScopeMemberExpr and FunctionTemplateDecl

2016-11-28 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Kareem. There are some tests in "class-template" dir that may serve as example. You don't need a warning for a function that was found: you should just return found declaration. There is already a warning for a declaration that is defined in multiple TUs. You c

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-11-29 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. That's excellent. Thank you for this work, Sean! Comment at: tools/clang-import-test/CMakeLists.txt:19 + ) \ No newline at end of file Please add a newline here. Comment at: tools/clang-import-test/clang-import-te

[PATCH] D27181: [ASTImporter] Support for importing UsingDecl and UsingShadowDecl

2016-11-29 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Thank you Kareem, It looks mostly good, but I'd like to have some functional tests in ASTMerge for this patch. Comment at: lib/AST/ASTImporter.cpp:4299 + if (ImportDeclParts(D, DC, LexicalDC, Name, AlreadyImported, Loc)) +return NULL; + assert(

[PATCH] D27717: [analyzer] Suppress a leak false positive in Qt's QObject::connectImpl()

2016-12-13 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, thanks! Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2577 if (FName == "postEvent" && FD->getQualifiedNameAsString() == "QCoreApplication

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-04-26 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/AST/ASTContext.cpp:1481 + assert(!FD->hasBody() && "FD has a definition in current translation unit!"); + if (!FD->getType()->getAs()) +return nullptr; // Cannot even mangle that. xazax.hun wrote: > a.sidorin

[PATCH] D31777: [ASTImporter] Move structural equivalence context to its own file. NFCI

2017-04-26 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. Refactoring changes are always appreciated. I only have a minor naming nit. Comment at: include/clang/AST/ASTStructuralEquivalence.h:33 + /// AST contexts for which we are checking structural equivalence. + ASTConte

[PATCH] D32702: [analyzer] Fix 'Memory Error' bugtype capitalization.

2017-05-01 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Artem. It is a good point but I think we should have a literal for this instead. https://reviews.llvm.org/D32702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D32751: [ASTImporter] Support new kinds of declarations (mostly Using*)

2017-05-02 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin created this revision. Herald added subscribers: rengolin, aemerson. Support new AST nodes: - UnresolvedUsingType - EmptyDecl - NamespaceAliasDecl - UsingDecl - UsingShadowDecl - UsingDirectiveDecl - UnresolvedUsingValueDecl - UnresolvedUsingTypenameDecl Refactor error handling in Imp

[PATCH] D32702: [analyzer] Fix 'Memory Error' bugtype capitalization.

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

[PATCH] D32981: [ASTImporter] Improve handling of incomplete types

2017-05-10 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. Looks good! Comment at: lib/AST/ASTImporter.cpp:1757 D2->setAnonymousStructOrUnion(true); +if (PrevDecl) { + D2->setPreviousDecl(PrevDecl);

[PATCH] D32751: [ASTImporter] Support new kinds of declarations (mostly Using*)

2017-05-10 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 98441. a.sidorin added a reviewer: karkhaz. a.sidorin added a comment. Address review comments; add the context. https://reviews.llvm.org/D32751 Files: lib/AST/ASTImporter.cpp test/ASTMerge/namespace/Inputs/namespace1.cpp test/ASTMerge/namespace/Inp

[PATCH] D32751: [ASTImporter] Support new kinds of declarations (mostly Using*)

2017-05-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 99668. a.sidorin added a comment. Replaced cast<> with cast_or_null<>. https://reviews.llvm.org/D32751 Files: lib/AST/ASTImporter.cpp test/ASTMerge/namespace/Inputs/namespace1.cpp test/ASTMerge/namespace/Inputs/namespace2.cpp test/ASTMerge/namespa

[PATCH] D32751: [ASTImporter] Support new kinds of declarations (mostly Using*)

2017-05-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 99669. a.sidorin added a comment. Removed accidentally duplicated comment. https://reviews.llvm.org/D32751 Files: lib/AST/ASTImporter.cpp test/ASTMerge/namespace/Inputs/namespace1.cpp test/ASTMerge/namespace/Inputs/namespace2.cpp test/ASTMerge/nam

[PATCH] D32751: [ASTImporter] Support new kinds of declarations (mostly Using*)

2017-05-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: lib/AST/ASTImporter.cpp:1311 + EmptyDecl *ToD = EmptyDecl::Create(Importer.getToContext(), DC, Loc); + ToD->setLexicalDeclContext(LexicalDC); + LexicalDC->addDeclInternal(ToD); xazax.hun wrote: > Don't we need an Im

<    1   2   3   4   5