aboutsummaryrefslogtreecommitdiff
path: root/clang/test/ASTMerge
AgeCommit message (Collapse)AuthorFilesLines
2017-04-03Revert r299355 "[ASTImporter] Fix for importing unnamed structs"Gabor Horvath3-133/+1
It breaks windows bots. llvm-svn: 299386
2017-04-03[ASTImporter] Fix for importing unnamed structsGabor Horvath3-1/+133
Patch by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D30876 llvm-svn: 299355
2017-04-03[ASTImporter] Lookup SearchName instead of NameGabor Horvath3-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 llvm-svn: 299354
2017-03-13[ASTImporter] Import fix of GCCAsmStmts w/ missing symbolic operandsGabor Horvath2-0/+11
Patch by Zoltan Gera! Differential Revision: https://reviews.llvm.org/D30831 llvm-svn: 297627
2017-02-20[ASTImporter] Support default argument initialization of ParmVarDeclsAleksei Sidorin2-0/+6
Patch by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D29612 llvm-svn: 295654
2017-01-23ASTImporter: fix tests on Windows with removing slashed parts of pathsAleksei Sidorin1-9/+9
Differential Revision: https://reviews.llvm.org/D26753 llvm-svn: 292781
2017-01-23ASTImporter: quick test fixAleksei Sidorin1-9/+9
Differential Revision: https://reviews.llvm.org/D26753 llvm-svn: 292779
2017-01-23ASTImporter: add forgotten tests for rL292776Aleksei Sidorin3-0/+222
llvm-svn: 292778
2016-11-16Fixed layout of test/ASTMerge.Sean Callanan61-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 llvm-svn: 287129
2016-11-07Updated ASTMerge/macro.m to use _Nullable.Sean Callanan1-1/+1
llvm-svn: 286151
2016-11-07When the ASTImporter imports a source location, it avoids importing macroSean Callanan5-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 llvm-svn: 286144
2016-09-28ASTMerge: explicitly specify arch for GCCAsmStmt test to calm non-x86 buildbotsAleksei Sidorin2-0/+18
This should fix r282572. llvm-svn: 282578
2016-09-28ASTMerge: specify arch for GCCAsmStmt test explicitly to calm non-x86 buildbotsAleksei Sidorin1-11/+0
llvm-svn: 282576
2016-09-28[ASTImporter] Implement some expression-related AST node import (part 2)Aleksei Sidorin4-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 llvm-svn: 282572
2016-07-14When importing classes and structs with anonymous structs, it is critical thatSean Callanan3-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 llvm-svn: 275460
2016-05-16Added support to the ASTImporter for C++ constructor initializers.Sean Callanan2-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. llvm-svn: 269693
2016-05-14Revert r269546 "Added support to the ASTImporter for C++ constructor ↵Oleksiy Vyalov2-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 llvm-svn: 269575
2016-05-14Handle injected class names in the ASTImporter.Sean Callanan2-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. llvm-svn: 269551
2016-05-14Added support to the ASTImporter for C++ constructor initializers.Sean Callanan2-0/+27
Thanks to Aleksei Sidorin for review and advice. llvm-svn: 269546
2016-02-18[ASTImporter] Implement missing VisitAccessSpecDecl function in ASTImporter ↵Argyrios Kyrtzidis3-8/+10
class. Patch by Elisavet Sakellari! llvm-svn: 261274
2015-10-08Update tests touched by r249656David Majnemer2-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. llvm-svn: 249660
2015-07-16PR10405 - Desugar FunctionType and TemplateSpecializationType if any type ↵Nikola Smiljanic1-1/+1
that appears inside needs to be desugared. llvm-svn: 242371
2015-06-03[Hexagon] Reapply 238773 after fix to LLVM.Colin LeMahieu1-1/+0
llvm-svn: 238948
2015-06-01Revert "[Hexagon] Test passes for hexagon target now that the backend ↵Rafael Espindola1-0/+1
correctly generates relocations." This reverts commit r238754. It depends on r238748, which was reverted. llvm-svn: 238773
2015-06-01[Hexagon] Test passes for hexagon target now that the backend correctly ↵Colin LeMahieu1-1/+0
generates relocations. llvm-svn: 238754
2015-04-29XFAIL Hexagon until more codegen in place.Rick Foos1-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 llvm-svn: 236173
2015-04-28Implemented ASTImporter support for Stmts and fixedSean Callanan4-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. llvm-svn: 236012
2013-11-15Ignore test Inputs globally and remove redundant lit.local.cfg filesAlp Toker1-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. llvm-svn: 194814
2013-07-12Changes so that a few tests do not fail when running under guarded malloc.Argyrios Kyrtzidis1-1/+1
Guarded malloc emits some messages at the beginning in stderr when enabled. These messages caused a few tests to fail. llvm-svn: 186219
2013-07-04Add 'not' to commands that are expected to fail.Rafael Espindola10-10/+10
This is at least good documentation, but also opens the possibility of using pipefail. llvm-svn: 185652
2013-04-17Extended VerifyDiagnosticConsumer to also verify source file for diagnostic.Andy Gibbs1-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. llvm-svn: 179677
2012-12-20Fix code that attempted to produce a diagnostic with one DiagnosticEngine, thenRichard Smith3-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. llvm-svn: 170636
2012-10-19Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs1-0/+1
VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
2012-08-10Update VerifyDiagnosticConsumer to only get directives during parsing.Jordan Rose1-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. llvm-svn: 161650
2012-03-13Fix crash at @implementation with a forward reference as base class.Argyrios Kyrtzidis1-1/+1
rdar://11020003 llvm-svn: 152596
2011-10-04Improve location fidelity of objc decls.Argyrios Kyrtzidis1-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 '@'. llvm-svn: 141061
2011-03-27Flip the default for showing include stacks on notes to false. ThisChandler Carruth1-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. llvm-svn: 128390
2010-12-08Fix two thinkos and add a test for importing the AST of a categoryDouglas Gregor3-1/+31
implementation. llvm-svn: 121263
2010-12-07Implement AST import for Objective-C property implementationsDouglas Gregor3-1/+44
(@synthesize and @dynamic). llvm-svn: 121159
2010-12-07Implement ASTImporter support for Objective-C category implementations.Douglas Gregor2-0/+17
llvm-svn: 121139
2010-12-07Extern the ASTImporter to import @implementation declarations.Douglas Gregor3-1/+46
llvm-svn: 121097
2010-12-01Implement AST import support for class template specializations.Douglas Gregor3-0/+37
llvm-svn: 120523
2010-11-30Implement basic AST importing and merging support for class templateDouglas Gregor3-0/+56
declarations. llvm-svn: 120448
2010-10-15Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and ↵Argyrios Kyrtzidis1-2/+0
QualifierInfos (rdar://8513756). llvm-svn: 116598
2010-10-08Try to disable this again.Eric Christopher1-3/+5
llvm-svn: 116094
2010-10-08Disable this test temporarily in an attempt to green the buildbots.Eric Christopher1-3/+3
llvm-svn: 116082
2010-10-01Don't add an imported function into its lexical context until *after*Douglas Gregor2-0/+8
we've set all of its parameters. Fixes <rdar://problem/8499598>; thanks to Sean for the diagnosis. llvm-svn: 115387
2010-06-03Hack in some really terrible C++ record PCH support that I need right now.John McCall3-0/+25
This is required in order to test: The ASTImporter should set base classes after formally entering the definition. llvm-svn: 105401
2010-04-07Instead of counting totally diagnostics, split the count into a countChris Lattner8-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. llvm-svn: 100675
2010-02-24Add test for AST importing of C++ namespaces, missing from a prior commitDouglas Gregor3-0/+40
llvm-svn: 97062