summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* PR18870: Parse language linkage specifiers properly if the string-literal isRichard Smith2014-02-171-1/+1
| | | | | | spelled in an interesting way. llvm-svn: 201536
* PR18855: Add support for UCNs and UTF-8 encoding within ud-suffixes.Richard Smith2014-02-171-0/+32
| | | | llvm-svn: 201532
* Change PGO instrumentation to compute counts in a separate AST traversal.Bob Wilson2014-02-174-130/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we made one traversal of the AST prior to codegen to assign counters to the ASTs and then propagated the count values during codegen. This patch now adds a separate AST traversal prior to codegen for the -fprofile-instr-use option to propagate the count values. The counts are then saved in a map from which they can be retrieved during codegen. This new approach has several advantages: 1. It gets rid of a lot of extra PGO-related code that had previously been added to codegen. 2. It fixes a serious bug. My original implementation (which was mailed to the list but never committed) used 3 counters for every loop. Justin improved it to move 2 of those counters into the less-frequently executed breaks and continues, but that turned out to produce wrong count values in some cases. The solution requires visiting a loop body before the condition so that the count for the condition properly includes the break and continue counts. Changing codegen to visit a loop body first would be a fairly invasive change, but with a separate AST traversal, it is easy to control the order of traversal. I've added a testcase (provided by Justin) to make sure this works correctly. 3. It improves the instrumentation overhead, reducing the number of counters for a loop from 3 to 1. We no longer need dedicated counters for breaks and continues, since we can just use the propagated count values when visiting breaks and continues. To make this work, I needed to make a change to the way we count case statements, going back to my original approach of not including the fall-through in the counter values. This was necessary because there isn't always an AST node that can be used to record the fall-through count. Now case statements are handled the same as default statements, with the fall-through paths branching over the counter increments. While I was at it, I also went back to using this approach for do-loops -- omitting the fall-through count into the loop body simplifies some of the calculations and make them behave the same as other loops. Whenever we start using this instrumentation for coverage, we'll need to add the fall-through counts into the counter values. llvm-svn: 201528
* Revert "Debug info: Make DWARF4 the default for Darwin, too."Adrian Prantl2014-02-173-4/+15
| | | | | | | | | I'm holding this change to give maintainers of Darwin buildbots more time to update their toolchains. This reverts commit r201375. llvm-svn: 201520
* check-clang: Introduce the feature "non-ms-sdk" to suppress ↵NAKAMURA Takumi2014-02-162-1/+7
| | | | | | Driver/nostdincxx.cpp on msvc. llvm-svn: 201484
* check-clang: Introduce the feature "dw2" to suppress ↵NAKAMURA Takumi2014-02-162-0/+5
| | | | | | | CodeGenCXX/debug-info-namespace.cpp with *-win32. FIXME: Could we add itanium triple here? llvm-svn: 201483
* Introduce the feature "can-remove-opened-file" to suppress tests. [PR18856]NAKAMURA Takumi2014-02-162-1/+6
| | | | llvm-svn: 201482
* Use -target instead of ignored -arch to fix x86_64 buildersNico Rieck2014-02-161-1/+1
| | | | llvm-svn: 201480
* Remove useless XPASSNico Rieck2014-02-161-1/+0
| | | | llvm-svn: 201478
* Fix broken CHECK linesNico Rieck2014-02-1615-28/+28
| | | | llvm-svn: 201477
* FileCheck's -LABEL cannot be combined with -NOT or -DAGNico Rieck2014-02-163-19/+19
| | | | llvm-svn: 201476
* Fix broken RUN linesNico Rieck2014-02-163-7/+7
| | | | llvm-svn: 201475
* DebugInfo: imported_decl/using declarations at namespace scopeDavid Blaikie2014-02-151-1/+6
| | | | llvm-svn: 201470
* [Sema] Fix assertion hit while trying to do constant evaluation for a ↵Argyrios Kyrtzidis2014-02-151-0/+8
| | | | | | | | | | dependent expression inside a GNU statement expression. rdar://16064952 llvm-svn: 201468
* MS ABI: Remove a useless FileCheck lineDavid Majnemer2014-02-151-3/+0
| | | | | | | | 1. CHECK-NOT-LABEL is not valid FileCheck. 2. This test would not trigger the CHECK-NOT-LABEL even if 'interface' is replaced with 'struct'. llvm-svn: 201462
* Move test inputs into the Inputs directory (improvement/fix to r201419)David Blaikie2014-02-153-1/+1
| | | | llvm-svn: 201458
* PGO: fix a bug in parsing pgo data.Manman Ren2014-02-151-0/+3
| | | | | | | | When a function has a single counter, we will offset the pointer by 1 when parsing the next function. If a function has multiple counters, we are okay after skipping rest of the counters. llvm-svn: 201456
* MS ABI: Fix some layout testsDavid Majnemer2014-02-151-20/+16
| | | | | | | | Some lines intended to be used for testing x86_64 ABI compatibility were not firing because lines were annotated with the wrong FileCheck prefix: X64 vs 64 llvm-svn: 201454
* MS ABI: Fix some layout testsDavid Majnemer2014-02-151-14/+11
| | | | | | | | Some lines intended to be used for testing x86_64 ABI compatibility were not firing because lines were annotated with the wrong FileCheck prefix: X64 vs C64 llvm-svn: 201453
* [Objective-C Sema]. Warn when an indirectly overridden propertyFariborz Jahanian2014-02-151-0/+26
| | | | | | | | mismatches the one declared in current class; in addition to those that are directly overridden. // rdar://15967517 llvm-svn: 201446
* Fix crash-on-invalid if decltype(auto) is used as a deduced return type inRichard Smith2014-02-141-1/+3
| | | | | | C++11 mode. Continue to disallow return type deduction in C++11 for now. llvm-svn: 201438
* Consistently print anonymous namespace names as "<anonymous namespace>"David Blaikie2014-02-142-4/+4
| | | | | | | | | | | For some reason we have two bits of code handling this printing: lib/AST/Decl.cpp: OS << "<anonymous namespace>"; lib/AST/TypePrinter.cpp: OS << "<anonymous namespace>::"; it would be nice if we only had one... llvm-svn: 201437
* [IRGen]. Fixes a crash in using Objective-C array Fariborz Jahanian2014-02-141-0/+30
| | | | | | | | | properties by fixing shouldBindAsLValue to accept arrays (like record types) because we always manipulate them in memory. Patch suggested by John MaCall. // rdar://15610943 llvm-svn: 201428
* If the headermap maps the filename to a framework include ("Foo.h" -> ↵Argyrios Kyrtzidis2014-02-143-0/+12
| | | | | | | | | | | | | | "Foo/Foo.h"), continue header lookup using the framework include as filename. This allows us to conveniently treat #import "Foo.h" as an implicit module import if we can resolve "Foo/Foo.h" as such. rdar://16042979 llvm-svn: 201419
* Enable generation of unwind tables when building with sanitizers.Evgeniy Stepanov2014-02-141-0/+11
| | | | llvm-svn: 201391
* Enable AArch64 NEON by default.Jiangning Liu2014-02-142-2/+4
| | | | llvm-svn: 201384
* Add a command line option -gdwarf-aranges that will turn on emittingEric Christopher2014-02-141-1/+5
| | | | | | the dwarf .debug_aranges section. llvm-svn: 201379
* Debug info: Make DWARF4 the default for Darwin, too.Adrian Prantl2014-02-143-15/+4
| | | | llvm-svn: 201375
* Enable correcting a member declaration where the type is class template,Kaelyn Uhrain2014-02-131-0/+11
| | | | | | | | | and the class name is shadowed by another member. Recovery still needs to be figured out, which is non-trivial since the parser has already gone down a much different path than if it had recognized the class template as type instead of seeing the member that shadowed the class template. llvm-svn: 201360
* Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove ↵Daniel Sanders2014-02-132-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hasRawTextSupport() call Summary: AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output. The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as. All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler. Changes since review (and last commit attempt): - Fixed test failures that were missed due to configuration of local build. (fixes crash.ll and a couple others). - Fixed tests that happened to pass because the local build was on X86 (should fix 2007-12-17-InvokeAsm.ll) - mature-mc-support.ll's should no longer require all targets to be compiled. (should fix ARM and PPC buildbots) - Object output (-filetype=obj and similar) now forces the integrated assembler to be enabled regardless of default setting or -no-integrated-as. (should fix SystemZ buildbots) Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2686 llvm-svn: 201333
* XCore target pass -v flag to assembler & linkerRobert Lytton2014-02-131-3/+4
| | | | llvm-svn: 201312
* XCore target -fexceptions flag handlingRobert Lytton2014-02-131-0/+15
| | | | | | | XCore target has -fno-exception as the default option Pass on "-fexceptions" flag to xcc (linker) llvm-svn: 201310
* Add EXPERIMENTAL --rtlib=compiler-rt to GNU ClangRenato Golin2014-02-131-0/+40
| | | | | | | | | | | | | | | | | | This commit is not strictly correct nor accounts for all uses (shared objects, for example), but it allows one to test the compiler-rt library on GNU targets. Using this patch to run the test-suite has already shown me problems on ARM. Since this is a Darwin-only flag, nobody is using it, so it shouldn't be a problem. I will need extension to deal with the shared cases, but since we're not compiling libclang_rt.so, that's not yet applicable. Many other problems will have to be fixed first in compiler-rt (such as removing the 'arch' name from it and making it trully multi-arch, moving it to the default lib directory, make both .a and .so variants, etc). llvm-svn: 201307
* [OPENMP] 'if' clause support (no CodeGen support)Alexey Bataev2014-02-132-6/+49
| | | | llvm-svn: 201297
* There is no std namespace for standards-based attributes. Removing the scope ↵Aaron Ballman2014-02-131-3/+0
| | | | | | qualifier and updating the only affected test case. llvm-svn: 201294
* Fixing a compiler assertion with zero-width bit-fields in packed structs.Yunzhong Gao2014-02-131-0/+15
| | | | | | | | | According to the GNU docs, zero-sized bitfields should not be affected by the packed attribute. Differential Revision: http://llvm-reviews.chandlerc.com/D2693 llvm-svn: 201288
* ms_struct layout replaces platform-specific behavior likeJohn McCall2014-02-131-0/+43
| | | | | | | | | useBitFieldTypeAlignment() and appears to ignore the special bit-packing semantics of __attribute__((packed)). Further flesh out an already-extensive comment. llvm-svn: 201282
* Change testcase to use FileCheck.John McCall2014-02-131-17/+22
| | | | llvm-svn: 201281
* Fix some -Wdocumentation warnings in Sema.h and try to fix test for win64Reid Kleckner2014-02-131-1/+1
| | | | llvm-svn: 201278
* MS ABI: Implement #pragma vtordisp() and clang-cl /vdNReid Kleckner2014-02-123-2/+184
| | | | | | | | | | | | | | | | | These features are new in VS 2013 and are necessary in order to layout std::ostream correctly. Currently we have an ABI incompatibility when self-hosting with the 2013 stdlib in our convertible_fwd_ostream wrapper in gtest. This change adds another implicit attribute, MSVtorDispAttr, because implicit attributes are currently the best way to make sure the information stays on class templates through instantiation. Reviewers: majnemer Differential Revision: http://llvm-reviews.chandlerc.com/D2746 llvm-svn: 201274
* Remove FIXME and hardcoded triple from this test (PR18251)Hans Wennborg2014-02-121-3/+1
| | | | | | We don't support using the MS ABI with non-x86/x86_64 targets anyway. llvm-svn: 201260
* Sema: Restrict alignment to 2**28.David Majnemer2014-02-121-0/+1
| | | | | | | | Allowing alignment past this point causes wrap around within clang. N.B. GCC has the same restriction. llvm-svn: 201254
* relax testcase and make ppc64 buildbots happy.Adrian Prantl2014-02-121-4/+4
| | | | llvm-svn: 201250
* libclang: report error code for bad PCH filesDmitri Gribenko2014-02-122-1/+15
| | | | | | | | | | | | | | | | | | | This commit improves libclang to report the error condition when CXTranslationUnit can not be created because of a stale PCH file. This allows the caller, for example, to rebuild the PCH file and retry the request. There two are APIs in libclang that return a CXTranslationUnit and don't support reporting detailed errors (the only error condition is a NULL result). For these APIs, a second, superior, version is introduced -- clang_createTranslationUnit2 and clang_parseTranslationUnit2. These functions return a CXTranslationUnit indirectly and also return an error code. Old functions are still supported and are nothing more than convenience wrappers that ignore extended error codes. As a cleanup, this commit also categorizes some libclang errors in the functions I had to modify anyway. llvm-svn: 201249
* Document and improve the debug-property-synth.m test based on theAdrian Prantl2014-02-121-6/+22
| | | | | | information provided in the referenced radar. llvm-svn: 201248
* Revert "Remove bad debug info test."Adrian Prantl2014-02-121-0/+20
| | | | | | | | This reverts commit r201183. The test, albeit undocumented and badly written is still testing something useful. It will be updated in a subsequent commit. llvm-svn: 201247
* Revert r201237+r201238: Demote EmitRawText call in ↵Daniel Sanders2014-02-122-6/+5
| | | | | | | | AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call It introduced multiple test failures in the buildbots. llvm-svn: 201241
* Arcanist failed to commit the two clang test corrections that should have ↵Daniel Sanders2014-02-122-5/+6
| | | | | | been in r201237. llvm-svn: 201238
* ARM & NEON: add test for r101232Tim Northover2014-02-121-0/+217
| | | | | | rdar://problem/16035743 llvm-svn: 201233
* Don't use find | xargs in ↵Dmitri Gribenko2014-02-121-3/+3
| | | | | | | | test/Modules/fmodules-validate-once-per-build-session.c With -fdisable-module-hash, we can implement this with a simple 'cp'. llvm-svn: 201231
OpenPOWER on IntegriCloud