summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Add FIXME describing the limitation of using column info to disambiguate ↵David Blaikie2014-05-101-106/+47
| | | | | | | | | | | | | | | | | | | | inlining. Also tidy up, simplify, and extend the test coverage to demonstrate the limitations. This test should now fail if the bugs are fixed (& hopefully whoever ends up in this situation sees the FIXMEs and realizes that the test needs to be updated to positively test their change that has fixed some or all of these issues). I do wonder whether I could demonstrate breakage without a macro here, but any way I slice it I can't think of a way to get two calls to the same function on the same line/column in non-macro C++ - implicit conversions happen at the same location as an explicit function, but you'd never get an implicit conversion on the result of an explicit call to the same implicit conversion operator (since the value is already converted to the desired result)... llvm-svn: 208468
* MS ABI: Pass 'sret' as the second parameter of instance methodsReid Kleckner2014-05-093-20/+20
| | | | | | | | | | | | | | | | | Summary: MSVC always passes 'sret' after 'this', unlike GCC. This required changing a number of places in Clang that assumed the sret parameter was always first in LLVM IR. This fixes win64 MSVC ABI compatibility for methods returning structs. Reviewers: rsmith, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3618 llvm-svn: 208458
* Don't emit -Wnon-virtual-dtor on final classes, since it's not a problem there.David Blaikie2014-05-091-1/+1
| | | | | | | | | The base class is the culprit/risk here - a sealed/final derived class with virtual functions and a non-virtual dtor can't accidentally be polymorphically destroyed (if the base class's dtor is protected - which also suppresses this warning). llvm-svn: 208449
* PR19698, PR19674: enable __has_feature checks for cxx_generic_lambdas andRichard Smith2014-05-091-0/+20
| | | | | | | cxx_decltype_auto, and fix documentation of cxx_generic_lambdas and cxx_init_captures to specify the right feature-check name. llvm-svn: 208445
* Objective-C. Reduce false positive warnings with -Wselector by issuing warning Fariborz Jahanian2014-05-093-2/+32
| | | | | | | only when named selector is declared in TU and it is not declared in a system header. rdar://16600230 llvm-svn: 208443
* ThreadSafetyAnalysis: Don't crash when trying to analyze objc methods.Benjamin Kramer2014-05-091-0/+19
| | | | | | | | | | | The thread safety analysis isn't very useful in ObjC (you can't annotate ObjC classes or methods) but we can still analyze the actual code and show violations in usage of C/C++ functions. Fixes PR19541, which does not use thread safety attributes but crashes with -Weverything. llvm-svn: 208436
* Reapply r208417 (olista01 'ARM: HFAs must be passed in consecutive ↵James Molloy2014-05-092-26/+26
| | | | | | registers'). Bots are now pacified. llvm-svn: 208425
* Revert r208417 (olista01 'ARM: HFAs must be passed in consecutive ↵James Molloy2014-05-092-26/+26
| | | | | | registers'). This is a followon commit from r208413 which broke the LLVM bots. llvm-svn: 208422
* ARM: HFAs must be passed in consecutive registersOliver Stannard2014-05-092-26/+26
| | | | | | | This is the clang counterpart to 208413, which ensures that Homogeneous Floating-point Aggregates are passed in consecutive registers on ARM. llvm-svn: 208417
* Permit duplicate explicit class instantiations if MSVCCompat is enabledWill Wilson2014-05-091-0/+9
| | | | llvm-svn: 208402
* Revised wording for diagnostics in r208299Ismail Pazarbasi2014-05-091-3/+3
| | | | llvm-svn: 208401
* Add support for partial jump scope checkingAlp Toker2014-05-091-11/+31
| | | | | | | | | | This lets us diagnose and perform more complete semantic analysis when faced with errors in the function body or declaration. By recovering here we provide more consistent diagnostics, particularly during interactive editing. llvm-svn: 208394
* Switch Wmodule-build to a remarkBen Langmuir2014-05-081-2/+2
| | | | | | | | | On reflection, this is better despite the missing command-line handling bits for remarks. Making this a remark makes it much clearer that this is purely informational and avoids the negative connotations of a 'warning'. llvm-svn: 208367
* Remove -Wnon-modular-includeBen Langmuir2014-05-081-12/+0
| | | | | | | | | | But keep -Wnon-modular-include-in-[framework-]module This warning is too noisy and doesn't really indicate a problem for most people. Even though it would only really affect people using -Weverything, that seems bad so remove it. llvm-svn: 208345
* Fix segmentation fault when mixing -Rpass with #line.Diego Novillo2014-05-081-0/+15
| | | | | | | | | | | | | | | | | | | Summary: When using #line directives, FileManager::getFile() will return a nil entry. This triggers an assert in translateFileLineCol(). This patch handles nil FileEntry instances by emitting a note that the location could not be translated back to a SourceLocation. I don't really like this solution, but we are translating presumed locations, so some information has already been lost. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3625 llvm-svn: 208315
* Fix PR19169 [Crash on invalid attempting to specialize a template method as ↵Karthik Bhat2014-05-081-0/+10
| | | | | | | | | a template variable]. A template declaration of a template name can be null in case we have a dependent name or a set of function templates. Hence use dyn_cast_or_null instead of dyn_cast. Also improve the diagnostic emitted in this case. llvm-svn: 208313
* Enable standalone-debug by default on FreeBSDEd Maste2014-05-081-1/+2
| | | | | | | | | | | | It was set by default on Darwin in r198655. The same usability issues with DTrace and LLDB apply to FreeBSD, so set it by default there too. rdar://problem/15758808 http://llvm.org/pr19676 Differential Revision: http://reviews.llvm.org/D3448 llvm-svn: 208310
* Explicitly keep track of temporaries during the consumed analysis.Manuel Klimek2014-05-081-0/+6
| | | | | | | This makes the consumed analysis less dependent on the CFG layout and fixes a bug where we wouldn't warn on an unconsumed value. llvm-svn: 208300
* Suggest fix-it ':' when '=' used in for-range-declarationIsmail Pazarbasi2014-05-081-1/+33
| | | | | | | | | | Fix for PR19176. Clang will suggest a fix-it hint for cases like: int arr[] = {1, 2, 3, 4}; for (auto i = arr) ^ : llvm-svn: 208299
* [OPENMP] Another one fix in test for msvcAlexey Bataev2014-05-081-4/+4
| | | | llvm-svn: 208279
* [OPENMP] Fix codegen test for msvc buildAlexey Bataev2014-05-081-2/+2
| | | | llvm-svn: 208278
* Driver: parse -mcmodel earlierSaleem Abdulrasool2014-05-081-0/+13
| | | | | | | | | | | This addresses an existing FIXME item in the driver. The code model flag was parsed in the actual tool rather than in the driver. This was problematic since the value may be invalid. In that case, we would silently treat it as a default value in non-assert builds, and abort in assert builds. Add a check in the driver to validate that the value being passed is valid, and if not provide a proper error message. llvm-svn: 208275
* CodeGen: Don't set hidden visibility on symbols with local linkageDuncan P. N. Exon Smith2014-05-072-24/+27
| | | | llvm-svn: 208258
* Add an Extension warning for applying unary * to an operand of type 'void*' inRichard Smith2014-05-071-1/+1
| | | | | | | C++. This seems like a pointless (and indeed harmful) restriction to me, so I've suggested removing it to -core and disabled this diagnostic by default. llvm-svn: 208254
* When doing int<->ptr coercion for big-endian, calculate the shift amount ↵James Molloy2014-05-071-0/+9
| | | | | | | | | | | | | | | correctly. Previously we calculated the shift amount based upon DataLayout::getTypeAllocSizeInBits. This will only work for legal types - types such as i24 that are created as part of structs for bitfields will return "32" from that function. Change to using getTypeSizeInBits. It turns out that AArch64 didn't run across this problem because it always returned [1 x i64] as the type for a bitfield, whereas ARM64 returns i64 so goes down this (better, but wrong) codepath. llvm-svn: 208231
* Remove "CH_ECK" line (which is ignored) from test after r154191.Nico Weber2014-05-071-3/+1
| | | | | | | | | | | | r154191 switched to atexit() instead of global destructors, so the intent was probably to check for _GLOBAL__D_a _not_ being in the output. There already is a line for _ZN3barD1Ev further up, so just remove the CH_ECK line referring to that. The only circumstance in which clang emits _GLOBAL__D_a destructor symbols is for -fapple-kext, and that is tested by test/CodeGenCXX/cxx-apple-kext.cpp. llvm-svn: 208222
* [mips] Pass nan2008 info to the back-end.Matheus Almeida2014-05-071-0/+12
| | | | | | | | | | | | Summary: The initial support for NaN2008 was added to the back-end in r206396. Reviewers: atanasyan Reviewed By: atanasyan Differential Revision: http://reviews.llvm.org/D3448 llvm-svn: 208220
* Re-satisfy the bots. Due to a de-sync between my clang and LLVM trees, I ↵James Molloy2014-05-071-1/+1
| | | | | | didn't notice that the generated BE alignment register is now unnamed and is not called '%align_be'. llvm-svn: 208217
* [ARM64-BE] Correctly deal with single element HFAs in varargs.James Molloy2014-05-071-0/+13
| | | | | | | Just because the first "if" didn't fire, doesn't mean we can not have an HFA in the "else" clause. llvm-svn: 208216
* ARM: Fix assertion caused by passing bitfield struct using ↵Oliver Stannard2014-05-071-2/+6
| | | | | | | | | | | | ABIArgInfo::getExpandWithPadding In cases where a struct must, according to the AAPCS, not be split between general purpose and floating point registers, we use ABIArgInfo::getExpandWithPadding to add the padding arguments. However, ExpandWithPadding does not work if the struct contains bitfields, so we instead must use ABIArgInfo::getDirect. llvm-svn: 208185
* Drop libgcc and default to libc++ for NetBSD/ARM on 6.99.40+.Joerg Sonnenberger2014-05-072-10/+47
| | | | | | | Don't bother with keeping the old support for x86_64 in 6.99.23+, just use a single range. Update test cases for the always-on --eh-frame-hdr. llvm-svn: 208170
* [OPENMP] Fixed checking for mangled names in parallel_codegen.cpp testAlexey Bataev2014-05-071-12/+12
| | | | llvm-svn: 208165
* [OPENMP] Fixed problem with temp removal on some platforms in codegen for ↵Alexey Bataev2014-05-071-2/+0
| | | | | | '#pragma omp parallel' llvm-svn: 208162
* Fixing tests to account for LLVM r208159.David Blaikie2014-05-072-5/+5
| | | | llvm-svn: 208160
* [OPENMP] Temporarily disable test parallel_codegen.cppAlexey Bataev2014-05-071-0/+2
| | | | llvm-svn: 208156
* [analyzer] Functions marked __attribute__((const)) don't modify any memory.Jordan Rose2014-05-071-0/+29
| | | | | | | | | This applies to __attribute__((pure)) as well, but 'const' is more interesting because many of our builtins are marked 'const'. PR19661 llvm-svn: 208154
* If an instantiation of a template is required to be a complete type, checkRichard Smith2014-05-074-26/+31
| | | | | | | whether the definition of the template is visible rather than checking whether the instantiated definition happens to be in an imported module. llvm-svn: 208150
* Clean up some existing keyword tests in the test/Lexer directory by using theYunzhong Gao2014-05-074-19/+34
| | | | | | | | pre-defined __is_identifier() macro. Differential Revision: http://reviews.llvm.org/D3460 llvm-svn: 208147
* Rename "secondary initializer" -> "convenience initializer" in the warnings, ↵Argyrios Kyrtzidis2014-05-061-7/+7
| | | | | | which is a more correct and consistent term. llvm-svn: 208142
* AST: Update reference temporary manglingDavid Majnemer2014-05-069-137/+137
| | | | | | | | | | | | | | | Summary: Update our mangling to match the discussion on cxx-abi-dev. This involves using a seq-id instead of an optional number. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3631 llvm-svn: 208140
* Add testcase for r208062.Nick Lewycky2014-05-061-1/+11
| | | | llvm-svn: 208138
* Include translation unit filename in global ctor symbol names.Nico Weber2014-05-068-14/+14
| | | | | | | | | | | | | | | | | This makes it easier to see where a global ctor comes from, and it also makes ASan's init order analyzer output easier to understand. gcc does this too, but only in -fPIC mode for some reason. Don't do this for constructors with explicit init priority. Also prepend "sub_" before the 'I', that way regular constructors stay lexicographically after symbols with init priority (because ord('s') > ord('I')). gold seems to ignore the name of constructor symbols, and ld only looks at the symbol if it includes an init priority, which this patch doesn't change. Before: __GLOBAL_I_a Now: __GLOBAL_sub_I_myfile.cc llvm-svn: 208128
* Reapply: DebugInfo: Emit the definition of enums when the definition ↵David Blaikie2014-05-063-1/+70
| | | | | | | | | | | | | | | | | | | preceeds the declaration and initial use. Reverting r208106 to reapply r208065 with a fix for the regression. The issue was that the enum tried to be built even if the declaration hadn't been constructed for debug info - presenting problems for enum templates and typedefs of enums with names for linkage purposes. Original commit message: This regressed a little further 208055 though it was already a little broken. While the requiresCompleteType optimization should be implemented here. Future (possibly near future) work. llvm-svn: 208114
* Revert "DebugInfo: Emit the definition of enums when the definition preceeds ↵David Blaikie2014-05-062-52/+1
| | | | | | | | | | | the declaration and initial use." This is breaking the compiler-rt build. Reverting while I investigate/fix. This reverts commit r208065. llvm-svn: 208106
* Add driver support for AArch64 Fedora.Tilmann Scheller2014-05-066-0/+18
| | | | | | Reviewed by Eric Christopher. llvm-svn: 208105
* [OPENMP] Another one fix for codegen test '#pragma omp parallel'Alexey Bataev2014-05-061-1/+1
| | | | llvm-svn: 208087
* [OPENMP] Fixed test for '#pragma omp parallel' codegenAlexey Bataev2014-05-061-48/+46
| | | | llvm-svn: 208086
* [OPENMP] Temporary disable test for parallel codegenAlexey Bataev2014-05-061-1/+2
| | | | llvm-svn: 208078
* [OPENMP] Initial codegen for '#pragma omp parallel'Alexey Bataev2014-05-061-0/+146
| | | | llvm-svn: 208077
* [PATCH] [ARM64] Enable alignment control option in front-end for ARM64.Kevin Qin2014-05-061-9/+32
| | | | | | | This patch is to get "-mno-unaligned-access" and "-munaligned-access" work in front-end for ARM64 target. llvm-svn: 208075
OpenPOWER on IntegriCloud