summaryrefslogtreecommitdiffstats
path: root/test/ASTMerge
Commit message (Collapse)AuthorAgeFilesLines
* Revert r299355 "[ASTImporter] Fix for importing unnamed structs"Gabor Horvath2017-04-033-133/+1
| | | | | | | It breaks windows bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299386 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASTImporter] Fix for importing unnamed structsGabor Horvath2017-04-033-1/+133
| | | | | | | | | Patch by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D30876 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299355 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASTImporter] Lookup SearchName instead of NameGabor Horvath2017-04-033-1/+38
| | | | | | | | | | | When the SearchName is already calculated we should use that for the lookup. Patch by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D30877 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299354 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASTImporter] Import fix of GCCAsmStmts w/ missing symbolic operandsGabor Horvath2017-03-132-0/+11
| | | | | | | | | Patch by Zoltan Gera! Differential Revision: https://reviews.llvm.org/D30831 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297627 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASTImporter] Support default argument initialization of ParmVarDeclsAleksei Sidorin2017-02-202-0/+6
| | | | | | | | | Patch by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D29612 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295654 91177308-0d34-0410-b5e6-96231b3b80d8
* ASTImporter: fix tests on Windows with removing slashed parts of pathsAleksei Sidorin2017-01-231-9/+9
| | | | | | | Differential Revision: https://reviews.llvm.org/D26753 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292781 91177308-0d34-0410-b5e6-96231b3b80d8
* ASTImporter: quick test fixAleksei Sidorin2017-01-231-9/+9
| | | | | | | Differential Revision: https://reviews.llvm.org/D26753 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292779 91177308-0d34-0410-b5e6-96231b3b80d8
* ASTImporter: add forgotten tests for rL292776Aleksei Sidorin2017-01-233-0/+222
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292778 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed layout of test/ASTMerge.Sean Callanan2016-11-1661-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | As outlined in a previous RFC, the test/ASTMerge/Inputs folder is getting full and the tests are starting to become interdependent. This is undesirable because - it makes it harder to write new tests - it makes it harder to figure out at a glance what old tests are doing, and - it adds the risk of breaking one test while changing a different one, because of the interdependencies. To fix this, according to the conversation in the RFC, I have changed the layout from a.c Inputs/a1.c Inputs/a2.c to a/test.c a/Inputs/a1.c a/Inputs/a2.c for all existing tests. I have also eliminated interdependencies by replicating the input files for each test that uses them. https://reviews.llvm.org/D26571 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287129 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated ASTMerge/macro.m to use _Nullable.Sean Callanan2016-11-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286151 91177308-0d34-0410-b5e6-96231b3b80d8
* When the ASTImporter imports a source location, it avoids importing macroSean Callanan2016-11-075-0/+25
| | | | | | | | | | | | | | | | | | expansions by calling getSpellingLoc(). That's great in most cases, but for macros defined in the '<built-in>' source file, the source file is invalid and does not import correctly, causing an assertion failure (the assertion is Invalid SLocOffset or bad function choice). A more reliable way to avoid this is to use getFileLoc(), which does not return built-in locations. This avoids the crash but still preserves valid source locations. I've added a testcase that covers the previously crashing scenario. https://reviews.llvm.org/D26054 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286144 91177308-0d34-0410-b5e6-96231b3b80d8
* ASTMerge: explicitly specify arch for GCCAsmStmt test to calm non-x86 buildbotsAleksei Sidorin2016-09-282-0/+18
| | | | | | | This should fix r282572. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282578 91177308-0d34-0410-b5e6-96231b3b80d8
* ASTMerge: specify arch for GCCAsmStmt test explicitly to calm non-x86 buildbotsAleksei Sidorin2016-09-281-11/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282576 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASTImporter] Implement some expression-related AST node import (part 2)Aleksei Sidorin2016-09-284-0/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Some code cleanup * Add tests not present in http://reviews.llvm.org/D14286 * Integrate a test suite from Serge Pavlov (http://reviews.llvm.org/D14224) * ArrayTypeTraitExpr: serialize sub-expression to avoid keeping it undefined * Implement import of some nodes: - ArrayTypeTraitExpr - ExpressionTraitExpr - OpaqueValueExpr - ArraySubscriptExpr - ExplicitCastExpr - ImplicitValueInitExpr - OffsetOfExpr - CXXThisExpr - CXXThrowExpr - CXXNoexceptExpr - CXXDefaultArgExpr - CXXScalarValueInitExpr - CXXBindTemporaryExpr - CXXTemporaryObjectExpr - MaterializeTemporaryExpr - ExprWithCleanups - StaticAssertDecl - FriendDecl - DecayedType Differential Revision: https://reviews.llvm.org/D14326 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282572 91177308-0d34-0410-b5e6-96231b3b80d8
* When importing classes and structs with anonymous structs, it is critical thatSean Callanan2016-07-143-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | distinct anonymous structs remain distinct despite having similar layout. This is already ensured by distinguishing based on their placement in the parent struct, using the function `findAnonymousStructOrUnionIndex`. The problem is that this function only handles anonymous structs, like ``` class Foo { struct { int a; } } ``` and not untagged structs like ``` class Foo { struct { int a; } var; } ``` Both need to be handled, and this patch fixes that. The test case ensures that this functionality doesn't regress. Thanks to Manman Ren for review. https://reviews.llvm.org/D22270 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275460 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support to the ASTImporter for C++ constructor initializers.Sean Callanan2016-05-162-0/+29
| | | | | | | | | | Also added named casts and propagation of "implicit" to fix the LLDB testsuite. This is a fixed commit of r269546, which was reverted by r269575. Thanks to Aleksei Sidorin for review and advice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269693 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r269546 "Added support to the ASTImporter for C++ constructor ↵Oleksiy Vyalov2016-05-142-27/+0
| | | | | | initializers." as it breaks TestDataFormatterSynthVal.DataFormatterSynthValueTestCase.test_with_run_command_dwarf test - http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/14699 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269575 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle injected class names in the ASTImporter.Sean Callanan2016-05-142-0/+15
| | | | | | | | | | | | | | | | | | | Every class as parsed by Clang has a forward declaration of itself as a member: class A { class A; ... } but when the parser generates this it ensures that the RecordTypes for the two are the same. This makes (among other things) inheritance work. This patch fixes a bug where the ASTImporter generated two separate RecordTypes when importing the class and the contained forward declaration, and adds a test case. Thanks to Doug Gregor for advice on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269551 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support to the ASTImporter for C++ constructor initializers.Sean Callanan2016-05-142-0/+27
| | | | | | | Thanks to Aleksei Sidorin for review and advice. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269546 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASTImporter] Implement missing VisitAccessSpecDecl function in ASTImporter ↵Argyrios Kyrtzidis2016-02-183-8/+10
| | | | | | | | class. Patch by Elisavet Sakellari! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261274 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests touched by r249656David Majnemer2015-10-082-6/+6
| | | | | | | | | These test updates almost exclusively around the change in behavior around enum: enums without a definition are considered incomplete except when targeting MSVC ABIs. Since these tests are interested in the 'incomplete-enum' behavior, restrict them to %itanium_abi_triple. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249660 91177308-0d34-0410-b5e6-96231b3b80d8
* PR10405 - Desugar FunctionType and TemplateSpecializationType if any type ↵Nikola Smiljanic2015-07-161-1/+1
| | | | | | that appears inside needs to be desugared. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242371 91177308-0d34-0410-b5e6-96231b3b80d8
* [Hexagon] Reapply 238773 after fix to LLVM.Colin LeMahieu2015-06-031-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238948 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[Hexagon] Test passes for hexagon target now that the backend ↵Rafael Espindola2015-06-011-0/+1
| | | | | | | | | | correctly generates relocations." This reverts commit r238754. It depends on r238748, which was reverted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238773 91177308-0d34-0410-b5e6-96231b3b80d8
* [Hexagon] Test passes for hexagon target now that the backend correctly ↵Colin LeMahieu2015-06-011-1/+0
| | | | | | generates relocations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238754 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL Hexagon until more codegen in place.Rick Foos2015-04-291-0/+1
| | | | | | | | | | | | | | | | | | Summary: Hexagon is being updated, but there is not enough to pass these tests. These sections are now on top of Colin's list. Test Plan: Ran changes on hexagon-build-03. Reviewers: colinl, rfoos Reviewed By: rfoos Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9356 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236173 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented ASTImporter support for Stmts and fixedSean Callanan2015-04-284-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some bugs in the ASTImporter that this exposed: - When importing functions, the body (if any) was previously ignored. This patch ensures that the body is imported also. - When a function-local Decl is imported, the first thing the ASTImporter does is import its context (via ImportDeclParts()). This can trigger importing the Decl again as part of the body of the function (but only once, since the function's Decl has been added to ImportedDecls). This patch fixes that problem by extending ImportDeclParts() to return the imported Decl if it was imported as part of importing its context, and the patch adds ASTImporter::GetAlreadyImportedOrNull() to support this query. All callers of ImportDeclParts return the imported version of the Decl if ImportDeclParts() returns it. - When creating functions, InnerLocStart of the source function was re-used without importing. This is a straight up bug, and this patch makes ASTImporter import the InnerLocStart and use the imported version. - When importing FileIDs, the ASTImporter previously always tried to re-load the file for the corresponding CacheEntry from disk. This doesn't work if the CacheEntry corresponds to a named memory buffer. This patch changes the code so that if the UniqueID for the cache entry is invalid (i.e., it is not a disk file) the whole entry is treated as if it were invalid, which forces an in-memory copy of the buffer. Also added test cases, using the new support committed in 236011. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236012 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore test Inputs globally and remove redundant lit.local.cfg filesAlp Toker2013-11-151-1/+0
| | | | | | | | | | By adding a default config.excludes pattern we can avoid individual suppressions in subdirectories. This matches LLVM's lit.cfg which also excludes a few other common non-test filenames for consistency. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194814 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes so that a few tests do not fail when running under guarded malloc.Argyrios Kyrtzidis2013-07-121-1/+1
| | | | | | | Guarded malloc emits some messages at the beginning in stderr when enabled. These messages caused a few tests to fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186219 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'not' to commands that are expected to fail.Rafael Espindola2013-07-0410-10/+10
| | | | | | | This is at least good documentation, but also opens the possibility of using pipefail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185652 91177308-0d34-0410-b5e6-96231b3b80d8
* Extended VerifyDiagnosticConsumer to also verify source file for diagnostic.Andy Gibbs2013-04-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VerifyDiagnosticConsumer previously would not check that the diagnostic and its matching directive referenced the same source file. Common practice was to create directives that referenced other files but only by line number, and this led to problems such as when the file containing the directive didn't have enough lines to match the location of the diagnostic in the other file, leading to bizarre file formatting and other oddities. This patch causes VerifyDiagnosticConsumer to match source files as well as line numbers. Therefore, a new syntax is made available for directives, for example: // expected-error@file:line {{diagnostic message}} This extends the @line feature where "file" is the file where the diagnostic is generated. The @line syntax is still available and uses the current file for the diagnostic. "file" can be specified either as a relative or absolute path - although the latter has less usefulness, I think! The #include search paths will be used to locate the file and if it is not found an error will be generated. The new check is not optional: if the directive is in a different file to the diagnostic, the file must be specified. Therefore, a number of test-cases have been updated with regard to this. This closes out PR15613. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179677 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix code that attempted to produce a diagnostic with one DiagnosticEngine, thenRichard Smith2012-12-203-0/+13
| | | | | | | | | produce a note for that diagnostic either with a different DiagnosticEngine or after calling DiagnosticEngine::Reset(). That didn't make any sense, and did the wrong thing if the original diagnostic was suppressed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170636 91177308-0d34-0410-b5e6-96231b3b80d8
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-191-0/+1
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
* Update VerifyDiagnosticConsumer to only get directives during parsing.Jordan Rose2012-08-101-0/+6
| | | | | | | | | | | | | | | | | | | | The old behavior was to re-scan any files (like modules) where we may have directives but won't actually be parsing during the -verify invocation. Now, we keep the old behavior in Debug builds as a sanity check (though modules are a known entity), and expect all legitimate directives to come from comments seen by the preprocessor. This also affects the ARC migration tool, which captures diagnostics in order to filter some out. This change adds an explicit cleanup to CaptureDiagnosticsConsumer in order to let its sub-consumer handle the real end of diagnostics. This was originally split into four patches, but the tests do not run cleanly without all four, so I've combined them into one commit. Patches by Andy Gibbs, with slight modifications from me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161650 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix crash at @implementation with a forward reference as base class.Argyrios Kyrtzidis2012-03-131-1/+1
| | | | | | rdar://11020003 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152596 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve location fidelity of objc decls.Argyrios Kyrtzidis2011-10-041-4/+4
| | | | | | | | -Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl. -Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the class name, not the location of '@'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141061 91177308-0d34-0410-b5e6-96231b3b80d8
* Flip the default for showing include stacks on notes to false. ThisChandler Carruth2011-03-271-1/+1
| | | | | | | | | | | | | required modifying a few tests that specifically use note include stacks to check the source manager's view of include stacks. I've simply added the flag to these tests for now, they may have to be more substantially changed if we decide to remove support for note include stacks altogether. Also, add a test for include stacks on notes that was supposed to go in with the previous commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128390 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix two thinkos and add a test for importing the AST of a categoryDouglas Gregor2010-12-083-1/+31
| | | | | | | implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121263 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement AST import for Objective-C property implementationsDouglas Gregor2010-12-073-1/+44
| | | | | | | (@synthesize and @dynamic). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121159 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement ASTImporter support for Objective-C category implementations.Douglas Gregor2010-12-072-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121139 91177308-0d34-0410-b5e6-96231b3b80d8
* Extern the ASTImporter to import @implementation declarations.Douglas Gregor2010-12-073-1/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121097 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement AST import support for class template specializations.Douglas Gregor2010-12-013-0/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120523 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement basic AST importing and merging support for class templateDouglas Gregor2010-11-303-0/+56
| | | | | | | declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120448 91177308-0d34-0410-b5e6-96231b3b80d8
* Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and ↵Argyrios Kyrtzidis2010-10-151-2/+0
| | | | | | QualifierInfos (rdar://8513756). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116598 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to disable this again.Eric Christopher2010-10-081-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116094 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable this test temporarily in an attempt to green the buildbots.Eric Christopher2010-10-081-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116082 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't add an imported function into its lexical context until *after*Douglas Gregor2010-10-012-0/+8
| | | | | | | | we've set all of its parameters. Fixes <rdar://problem/8499598>; thanks to Sean for the diagnosis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115387 91177308-0d34-0410-b5e6-96231b3b80d8
* Hack in some really terrible C++ record PCH support that I need right now.John McCall2010-06-033-0/+25
| | | | | | | | | | This is required in order to test: The ASTImporter should set base classes after formally entering the definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105401 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of counting totally diagnostics, split the count into a countChris Lattner2010-04-078-8/+8
| | | | | | | | | | | | | | | | | of errors and warnings. This allows us to emit something like this: 2 warnings and 1 error generated. instead of: 3 diagnostics generated. This also stops counting 'notes' because they are just follow-on information about the previous diag, not a diagnostic in themselves. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100675 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test for AST importing of C++ namespaces, missing from a prior commitDouglas Gregor2010-02-243-0/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97062 91177308-0d34-0410-b5e6-96231b3b80d8