[PATCH] D38208: Add support for remembering origins to ExternalASTMerger

2017-09-27 Thread Sean Callanan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314336: Add support for remembering origins to ExternalASTMerger (authored by spyffe). Changed prior to commit: https://reviews.llvm.org/D38208?vs=116680&id=116868#toc Repository: rL LLVM https://re

[PATCH] D38208: Add support for remembering origins to ExternalASTMerger

2017-09-26 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 116680. spyffe added a comment. Updates and small refactors requested by Bruno. Repository: rL LLVM https://reviews.llvm.org/D38208 Files: include/clang/AST/ExternalASTMerger.h lib/AST/ExternalASTMerger.cpp lib/Sema/SemaType.cpp test/Import/extern

[PATCH] D38208: Add support for remembering origins to ExternalASTMerger

2017-09-25 Thread Sean Callanan via Phabricator via cfe-commits
spyffe created this revision. spyffe added a project: clang. At @bruno 's request, recreating this with cfe-commits as a subscriber. The original is https://reviews.llvm.org/D36589 `ExternalASTMerger` has hitherto relied on being able to look up any Decl through its named `DeclContext` chain.

[PATCH] D36589: Add support for remembering origins to ExternalASTMerger

2017-09-25 Thread Sean Callanan via Phabricator via cfe-commits
spyffe abandoned this revision. spyffe marked 13 inline comments as done. spyffe added a comment. At @bruno 's request, abandoning this revision in favor of the updated https://reviews.llvm.org/D38208. That revision has all the changes requested. https://reviews.llvm.org/D36589 _

[PATCH] D36589: Add support for remembering origins to ExternalASTMerger

2017-09-25 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 116405. spyffe marked 18 inline comments as done. spyffe added a subscriber: cfe-commits. spyffe added a comment. Updated to reflect Bruno's suggestions. - Commented `ExternalASTMerger.h` extensively. - Refactored the log into a pluggable `raw_ostream` that de

[PATCH] D36429: [clang-import-test] Option to dump the IR for an expression

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310318: This adds the argument --dump-ir to clang-import-test, which allows (authored by spyffe). Changed prior to commit: https://reviews.llvm.org/D36429?vs=110095&id=110104#toc Repository: rL LLVM

[PATCH] D36429: [clang-import-test] Option to dump the IR for an expression

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 110095. spyffe added a comment. Eliminate sensitive dependence on `sizeof(int)`. `bool` should still be rendered as `i1` though. https://reviews.llvm.org/D36429 Files: test/Import/local-struct/Inputs/Callee.cpp test/Import/local-struct/test.cpp test/

[PATCH] D36429: [clang-import-test] Option to dump the IR for an expression

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 110093. spyffe added a comment. Added a passing test for a global struct, so we have something that'll fail if the IR dumping breaks. https://reviews.llvm.org/D36429 Files: test/Import/local-struct/Inputs/Callee.cpp test/Import/local-struct/test.cpp t

[PATCH] D36429: [clang-import-test] Option to dump the IR for an expression

2017-08-07 Thread Sean Callanan via Phabricator via cfe-commits
spyffe created this revision. This adds the argument `--dump-ir` to `clang-import-test`, which allows viewing of the final IR. This is useful for confirming that structure layout was correct. I've added an XFAILed test that exercises this, checking that a struct defined inside a function bod

[PATCH] D6550: ASTImporter: Fix missing SourceLoc imports

2017-06-16 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. Hmm, the transforming in place of `SelLocs` reads a little weirdly to me, but other than that the code seems fine. Is your concern that you don't know how to write an Objective-C test that would cover this? It looks to me like an Objective-C interface with a method: @

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

2017-05-12 Thread Sean Callanan via Phabricator via cfe-commits
spyffe marked 2 inline comments as done. spyffe added inline comments. Comment at: tools/clang-import-test/clang-import-test.cpp:263 +AddExternalSource(*CI, Imports); + } bruno wrote: > No need for the curly braces here Okay. https://reviews.llvm.org/D32

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

2017-05-10 Thread Sean Callanan via Phabricator via cfe-commits
spyffe marked an inline comment as done. spyffe added inline comments. Comment at: lib/AST/ASTImporter.cpp:1757 D2->setAnonymousStructOrUnion(true); +if (PrevDecl) { + D2->setPreviousDecl(PrevDecl); a.sidorin wrote: > By the way, should we do the

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

2017-05-10 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 98497. spyffe added a comment. • Added a FIXME per Aleksei Sidorin's suggestion. https://reviews.llvm.org/D32981 Files: include/clang/AST/ExternalASTMerger.h lib/AST/ASTImporter.cpp lib/AST/ASTStructuralEquivalence.cpp lib/AST/ExternalASTMerger.cpp

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

2017-05-08 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 98218. spyffe added a comment. Eliminated a //missing newline at end of file// error Repository: rL LLVM https://reviews.llvm.org/D32981 Files: include/clang/AST/ExternalASTMerger.h lib/AST/ASTImporter.cpp lib/AST/ASTStructuralEquivalence.cpp lib/

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

2017-05-08 Thread Sean Callanan via Phabricator via cfe-commits
spyffe created this revision. `ASTImporter` has some bugs when it's importing types that themselves come from an `ExternalASTSource`. This is exposed particularly in the behavior when comparing complete TagDecls with forward declarations. This patch does several things: - Adds a test case ma

[PATCH] D32724: [Modules] Include the enabled sanitizers in the module hash

2017-05-08 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added inline comments. Comment at: lib/Basic/LangOptions.cpp:32 - // FIXME: This should not be reset; modules can be different with different - // sanitizer options (this affects __has_feature(address_sanitizer) etc). - Sanitize.clear(); + // These options do not aff

[PATCH] D32724: [Modules] Include the enabled sanitizers in the module hash

2017-05-05 Thread Sean Callanan via Phabricator via cfe-commits
spyffe requested changes to this revision. spyffe added a comment. This revision now requires changes to proceed. A few minor nits, but the operation of ignoring certain sanitizer flags seems to be happening in the wrong place. Comment at: lib/Basic/LangOptions.cpp:32 - //

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

2017-04-24 Thread Sean Callanan via Phabricator via cfe-commits
spyffe accepted this revision. spyffe added a comment. This revision is now accepted and ready to land. Looks good to me. This is a good step toward simplifying the ASTImporter and breaking out its parts to be useful on their own. Obviously make sure the tests pass :) https://reviews.llvm.org/

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

2017-04-11 Thread Sean Callanan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299976: [clang-import-test] Lookup inside contexts (authored by spyffe). Changed prior to commit: https://reviews.llvm.org/D30435?vs=93929&id=94875#toc Repository: rL LLVM https://reviews.llvm.org/D

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

2017-04-03 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 93929. spyffe added a comment. Added the `ExternalASTMerger` implementation/interface, which I hadn't `svn add`ed before generating the last diff. Repository: rL LLVM https://reviews.llvm.org/D30435 Files: include/clang/AST/ExternalASTMerger.h lib/AS

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

2017-04-03 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 93927. spyffe added a comment. Herald added a subscriber: mgorny. • Broke all the `ASTImporter` and `ExternalASTSource` subclassing logic into its own source file, with its API defined in `AST/ExternalASTMerger.h`. • Cleaned up the API for LLDB's consumption:

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

2017-03-31 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 93721. spyffe added a comment. • Removed namespace qualification of `cast` across the board. • Standardized on `SmallVector` • Factored out the filtering of forward declarations • Fixed a loop as requested. • Made a Origin<> wrapper for arbitrary AST objects th

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

2017-02-27 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 89957. spyffe added a comment. • Applied Adrian's suggestion to move comments before the line they apply to. • Got to 100% coverage by changing a test and making an assert for something I couldn't make happen in a test. I did not take Adrian's suggestion to r

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

2017-02-27 Thread Sean Callanan via Phabricator via cfe-commits
spyffe created this revision. Herald added a subscriber: jgosnell. clang-import-test has until now been only able to report top-level entities. This is clearly insufficient; we should be able to look inside structs and namespaces also. This patch adds new test cases for a variety of lookups ins

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

2016-12-22 Thread Sean Callanan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL290367: Testbed and skeleton of a new expression parser (authored by spyffe). Changed prior to commit: https://reviews.llvm.org/D27180?vs=81991&id=82360#toc Repository: rL LLVM https://reviews.llvm.

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

2016-12-19 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 81991. spyffe marked 3 inline comments as done. spyffe added a comment. Applied Aleksei's comments, and integrated all the CMakeFiles fixes required to make the bots happy. Repository: rL LLVM https://reviews.llvm.org/D27180 Files: test/CMakeLists.txt

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

2016-12-16 Thread Sean Callanan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL290004: Testbed and skeleton of a new expression parser (authored by spyffe). Changed prior to commit: https://reviews.llvm.org/D27180?vs=81803&id=81807#toc Repository: rL LLVM https://reviews.llvm.

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

2016-12-16 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 81803. spyffe added a comment. Updated CMakeFiles to fix dependencies. - Fixed dependencies on `gen_intrinsics` - Added a testsuite dependency on clang-import-test Repository: rL LLVM https://reviews.llvm.org/D27180 Files: test/CMakeLists.txt test/Im

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

2016-12-15 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 81661. spyffe marked 2 inline comments as done. spyffe added a comment. Herald added a subscriber: jgosnell. Applied Vassil and Vedant's comments. I will commit this soon. Repository: rL LLVM https://reviews.llvm.org/D27180 Files: test/Import/clang-fla

[PATCH] D27683: Prepare PrettyStackTrace for LLDB adoption

2016-12-14 Thread Sean Callanan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289689: Prepare PrettyStackTrace for LLDB adoption (authored by spyffe). Changed prior to commit: https://reviews.llvm.org/D27683?vs=81304&id=81426#toc Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D27683: Prepare PrettyStackTrace for LLDB adoption

2016-12-13 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. The LLDB side of this is https://reviews.llvm.org/D27735 Repository: rL LLVM https://reviews.llvm.org/D27683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D27683: Prepare PrettyStackTrace for LLDB adoption

2016-12-13 Thread Sean Callanan via Phabricator via cfe-commits
spyffe retitled this revision from "Fix the linkage for __crashtracer_info__" to "Prepare PrettyStackTrace for LLDB adoption". spyffe updated the summary for this revision. spyffe updated this revision to Diff 81304. Repository: rL LLVM https://reviews.llvm.org/D27683 Files: include/llvm/Su

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

2016-11-30 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 79807. spyffe marked an inline comment as done. spyffe added a comment. Updated to reflect Vedant's comments. Also ensured 100% test coverage, by removing handling for errors that will never happen and by adding a few new tests. Repository: rL LLVM http

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

2016-11-30 Thread Sean Callanan via Phabricator via cfe-commits
spyffe marked 3 inline comments as done. spyffe added a comment. Thank you for your review, Vedant! I will update the patch to reflect your comments in a moment. > I'm concerned about the amount of covered-but-untested code this patch > introduces. Since there are no CHECK lines, it's hard for

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

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe updated this revision to Diff 79605. spyffe marked 2 inline comments as done. spyffe added a comment. Updated to reflect Aleksei's comments. Repository: rL LLVM https://reviews.llvm.org/D27180 Files: test/Import/empty-struct/Inputs/S.c test/Import/empty-struct/test.c tools/CMake

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

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe marked 11 inline comments as done. spyffe added a comment. Thank you, Alex! I've responded in a few places inline below, and will update this patch momentarily. Comment at: tools/clang-import-test/clang-import-test.cpp:106 + +const char *LineEnd = nullptr; + --

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

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. In https://reviews.llvm.org/D27180#607433, @hfinkel wrote: > This seems like a great idea. btw, do you know about Cling > (https://root.cern.ch/cling)? Hal, thank you for your interest! Yes, Cling is what I was referring to when I mentioned the ROOT project. Vassil V

[PATCH] D27033: [ASTImporter] Support importing UnresolvedLookupExpr nodes

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. Marked the place I was talking about in D27181 Comment at: lib/AST/ASTImporter.cpp:6489 + DeclarationNameInfo NameInfo(E->getName(), E->getNameLoc()); + ImportDeclarationNameLoc(E->getNameInfo(), NameInfo); + -

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

2016-11-29 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. Looks good, but I have a concern about the underlying branch's apparently inconsistent initialization of `DeclarationNameInfo`. Aleksei, could you clarify how that code works? Should we have a helper function so we don't have to carefully repeat this pattern everywhere

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

2016-11-28 Thread Sean Callanan via Phabricator via cfe-commits
spyffe created this revision. spyffe added reviewers: a.sidorin, beanz, loladiro, v.g.vassilev. spyffe added a subscriber: cfe-commits. spyffe set the repository for this revision to rL LLVM. Herald added a subscriber: mgorny. LLVM's JIT is now the foundation of dynamic-compilation features for ma

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

2016-11-28 Thread Sean Callanan via Phabricator via cfe-commits
spyffe accepted this revision. spyffe added a comment. This revision is now accepted and ready to land. Yeah, that test looks great! Thanks! Comment at: lib/AST/ASTImporter.cpp:496 +return false; + if (DN1->isIdentifier()) +return IsStructurallyEquivalent(

[PATCH] D27033: [ASTImporter] Support importing UnresolvedLookupExpr nodes

2016-11-28 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. I only have a stylistic nit to add to Aleksei's comments. Comment at: lib/AST/ASTImporter.cpp:6492 + UnresolvedSet<8> ToDecls; + for (UnresolvedLookupExpr::decls_iterator S = E->decls_begin(), +F = E->decls_e

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

2016-11-28 Thread Sean Callanan via Phabricator via cfe-commits
spyffe requested changes to this revision. spyffe added a comment. This revision now requires changes to proceed. There are several missing imports here, as well as a few minor nits. If the unit test cases aren't catching these, I'm a little concerned. We should be catching this. Also we should