summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Comment parsing: remove HTML attribute validationDmitri Gribenko2014-04-302-11/+11
| | | | | | | | | | | | Since the community says that a blacklist is not good enough, and I don't have enough time now to implement a proper whitelist, let's just remove the attribute validation. But, nevertheless, we can still communicate in the generated XML if our parser found an issue with the HTML. But this bit is best-effort and is specifically called out in the schema as such. llvm-svn: 207712
* Sema: Implement DR477David Majnemer2014-04-302-3/+7
| | | | | | | | | | | | Summary: Friend declarations shouldn't mention explicit or virtual. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3562 llvm-svn: 207682
* When typo-correcting a member using declaration, don't exclude member templates.Richard Smith2014-04-301-24/+35
| | | | llvm-svn: 207681
* When typo-correcting a member using-declaration, only consider members of ↵Richard Smith2014-04-301-7/+4
| | | | | | base classes. llvm-svn: 207680
* Fix crash if typo correction corrects a member using-declaration to aRichard Smith2014-04-301-0/+33
| | | | | | non-member declaration. Patch by Dinesh Dwivedi! llvm-svn: 207677
* __thread: Move constant init check to CheckCompleteVariableDeclarationReid Kleckner2014-04-301-0/+13
| | | | | | | | | | We were emitting dynamic initializers for __thread variables if there was no explicit initializer, as in this test case: struct S { S(); }; __thread S s; llvm-svn: 207675
* -Wunused-parameter: Don't fire on defaulted or deleted functionsReid Kleckner2014-04-301-0/+33
| | | | | | | | Patch by Dinesh Dwivedi! Differential Revision: http://reviews.llvm.org/D3376 llvm-svn: 207672
* Android uses -fpic for arm64 as well.Logan Chien2014-04-301-0/+2
| | | | llvm-svn: 207642
* Add a test for big-endian NEON on ARM64.James Molloy2014-04-301-0/+1
| | | | | | | The enabled test #includes <arm_neon.h>, which is sufficient to test all the code in r207624. llvm-svn: 207641
* [ARM64] Port remaining relevant AArch64 clang tests over to ARM64Bradley Smith2014-04-308-1/+53
| | | | llvm-svn: 207632
* Simplify test. No functional change intended.Andrea Di Biagio2014-04-301-1/+1
| | | | llvm-svn: 207623
* Add a triple to new test.Nico Weber2014-04-301-1/+1
| | | | | | NULL is just 0 on Windows, so the Wsentinel part of the test doesn't pass there. llvm-svn: 207607
* Let stddef.h respect __need_{wchar_t, size_t, NULL, ptrdiff_t, wint_t}.Nico Weber2014-04-302-1/+71
| | | | | | | | | | | | | | | | glibc expects that stddef.h only defines a single thing if either of these defines is set. For example, before this change, a C file containing #include <stdlib.h> int ptrdiff_t = 0; would compile with gcc but not with clang. Now it compiles with clang too. This also fixes PR12997, where older versions of the Linux headers would define NULL incorrectly, and glibc would define __need_NULL and expect stddef.h to redefine NULL with the correct definition. llvm-svn: 207606
* Defer loading any pending update records until we've finished deserializing.Richard Smith2014-04-303-0/+9
| | | | | | | This fixes a bug where an update record causes us to load an entity that refers to an entity we've not finished loading yet, resulting in badness. llvm-svn: 207603
* Drop non-cfi assembly support from clang.Rafael Espindola2014-04-302-44/+0
| | | | | | | | | | | | | | After this patch clang will ignore -fdwarf2-cfi-asm and -ffno-dwarf2-cfi-asm and always print assembly that uses cfi directives. In llvm, MC itself supports cfi since the end of 2010 (support started in r119972, is reported in the 2.9 release notes). In binutils the support has been around for much longer. It looks like support started to be added in May 2003. It is available in 2.15 (31-Aug-2011, 2.14 is from 12-Jun-2003). llvm-svn: 207602
* Add test case for revision 207575 to verify that on Windows, clang doesn'tAndrea Di Biagio2014-04-292-0/+11
| | | | | | | | | crash with an assertion failure when 'nul' is passed in input. Modified clang/test/lit.py to add feature 'system-windows' if `platform.system()` returns 'Windows'. llvm-svn: 207576
* scanf analysis: handle scanlists that start with ^] (PR19559)Hans Wennborg2014-04-291-0/+5
| | | | llvm-svn: 207573
* [PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a ↵Argyrios Kyrtzidis2014-04-292-1/+17
| | | | | | | | driver only thing and doesn't affect any language/preprocessor/etc. semantics. rdar://16714526 llvm-svn: 207570
* Android uses -fpic for aarch64.Logan Chien2014-04-291-0/+2
| | | | llvm-svn: 207567
* [analyzer] Improve test from r207486.Jordan Rose2014-04-291-5/+8
| | | | | | | | | | | | The constructor that comes right before a variable declaration in the CFG might not be the initialization of that variable. Previously, we just checked that the variable's initializer expression was different from the construction expression, but forgot to see whether the variable had an initializer expression at all. Thanks for the prompting, David. llvm-svn: 207562
* [analyzer] Don't assert when combining using .* on a temporary.Jordan Rose2014-04-291-1/+19
| | | | | | | | | | | | | While we don't model pointer-to-member operators yet (neither .* nor ->*), CallAndMessageChecker still checks to make sure the 'this' object is not null or undefined first. However, it also expects that the object should always have a valid MemRegion, something that's generally important elsewhere in the analyzer as well. Ensure this is true ahead of time, just like we do for member access. PR19531 llvm-svn: 207561
* Reapply r207477 and r207479 without cyclic dependencyBen Langmuir2014-04-294-1/+107
| | | | | | | | Fixed by moving ProcessWarningOptions from Frontend into Basic. All of the dependencies for ProcessWarningOptions were already in Basic, so this was a small change. llvm-svn: 207549
* Objective-C. Improve diagnosis of bridging types.Fariborz Jahanian2014-04-294-145/+389
| | | | | | // rdar://16737117 llvm-svn: 207542
* Pass -pie to linker when generating executable on AndroidAlexey Volkov2014-04-291-0/+5
| | | | | | | | This fixes problem with LTO on Android. Differential Revision: http://reviews.llvm.org/D2668 llvm-svn: 207520
* AST: Fix visibility calculation for VarTemplateSpecializationDeclDavid Majnemer2014-04-291-0/+8
| | | | | | | | | | | | It is possible that a variable template specialization might not have a VisibilityAttr attached to it while the template that it specializes does, in fact, have one. We should consider the template in such cases. This fixes PR19597. llvm-svn: 207498
* Revert r207477 (and r207479), "Check -Werror options during module validation"NAKAMURA Takumi2014-04-294-107/+1
| | | | | | It tried to introduce cyclic dependencies. Serialization shouldn't depend on Frontend, since Frontend depends on Serialization. llvm-svn: 207497
* CodeGen: Reference temporaries inherit visibilityDavid Majnemer2014-04-291-0/+12
| | | | | | | Reference temporaries inherited many properties from the variable that they correspond to but visibility wasn't one of them. llvm-svn: 207496
* Make test independent of label. Thanks to Richard Smith for catching this!Adrian Prantl2014-04-291-4/+2
| | | | llvm-svn: 207489
* Run this test through instnamer to stop it failing on non-asserts clang builds.Richard Smith2014-04-291-1/+1
| | | | llvm-svn: 207488
* [analyzer] Don't crash when a construction is followed by an uninitialized ↵Jordan Rose2014-04-291-0/+27
| | | | | | | | | | variable. This could happen due to unfortunate CFG coincidences. PR19579 llvm-svn: 207486
* Revert r207482; I fail at reading IRC.Nico Weber2014-04-291-20/+0
| | | | llvm-svn: 207483
* Let stddef.h redefine NULL if __need_NULL is set, as needed by glibc, PR12997.Nico Weber2014-04-291-0/+20
| | | | | | | | | See the bug and the cfe-commits thread "[patch] Let stddef.h redefine NULL if __need_NULL is set" for discussion. Fixes PR12997 and is similar to the __need_wint_t bits already in this file. llvm-svn: 207482
* Debug info: Improve line table for functions with cleanups an early exitAdrian Prantl2014-04-291-0/+25
| | | | | | | | | | | | | and no return expr at the end of the function. The "function has only simple returns" check in FinishFunction tests whether the number of simple return exprs equals the number of return exprs, but so far a fallthrough at the end of a function was not counted as a return, which would result in cleanup code being associated with the wrong source line. rdar://problem/16733984. llvm-svn: 207480
* Add missing triple to make -isysroot workBen Langmuir2014-04-291-3/+3
| | | | llvm-svn: 207479
* Check -Werror options during module validationBen Langmuir2014-04-294-1/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch checks whether the diagnostic options that could lead to errors (principally -Werror) are consistent between when a module was built and when it is loaded. If there are new -Werror flags, then the module is rebuilt. In order to canonicalize the options we do this check at the level of the constructed DiagnosticsEngine, which contains the final set of diag to diagnostic level mappings. Currently we only rebuild with the new diagnostic options, but we intend to refine this in the future to include the union of the new and old flags, since we know the old ones did not cause errors. System modules are only rebuilt when -Wsystem-headers is enabled. One oddity is that unlike checking language options, we don’t perform this diagnostic option checking when loading from a precompiled header. The reason for this is that the compiler cannot rebuild the PCH, so anything that requires it to be rebuilt effectively leaks into the build system. And in this case, that would mean the build system understanding the complex relationship between diagnostic options and the underlying diagnostic mappings, which is unreasonable. Skipping the check is safe, because these options do not affect the generated AST. You simply won’t get new build errors due to changed -Werror options automatically, which is also true for non-module cases. llvm-svn: 207477
* LLVM supports TLS on Windows and we can use it from ClangReid Kleckner2014-04-291-3/+2
| | | | | | | | Patch by Martell Malone! Differential Revision: http://reviews.llvm.org/D3421 llvm-svn: 207470
* When Driver::generateCompilationDiagnostics is filtering the list ofPaul Robinson2014-04-281-1/+1
| | | | | | | inputs to the preprocessor, check for invalid types first because not all linker inputs have an option value to retrieve. llvm-svn: 207454
* Move all CUDA testing inputs to Inputs/ subdirectory inside the tests.Eli Bendersky2014-04-2814-24/+64
| | | | llvm-svn: 207453
* CodeGen: Fix linkage of reference temporariesDavid Majnemer2014-04-289-15/+67
| | | | | | | | | | | | | | | Summary: A reference temporary should inherit the linkage of the variable it initializes. Otherwise, we may hit cases where a reference temporary wouldn't have the same value in all translation units. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3515 llvm-svn: 207451
* [driver] Disable the slp vectorizer at -O0, -O1, and -Oz. This mirrors theChad Rosier2014-04-281-0/+11
| | | | | | | | behavior of the loop vectorizer, which is enabled at -O2, -O3, -O4, -Ofast and -Os. PR19568 llvm-svn: 207433
* [ARM64]Fix a bug cannot select UQSHL/SQSHL with constant i64 shift amount.Hao Liu2014-04-281-0/+12
| | | | llvm-svn: 207401
* [SemaCXX] Silence -Wconstant-logical-operand if the operand is a 0/1 from a ↵Argyrios Kyrtzidis2014-04-281-0/+10
| | | | | | | | | | | macro. Libraries specify enabled/disabled features using macro defs of 0/1, in such cases the -Wconstant-logical-operand is noise. rdar://15410291 llvm-svn: 207386
* [Index/DocComments] When cloning a full comment, pick the template ↵Argyrios Kyrtzidis2014-04-271-0/+15
| | | | | | | | | | parameters from the original FullComment, if the parameters are not already set (e.g. because it is a typedef). Fixes crash of rdar://16128173 llvm-svn: 207382
* [SemaObjC] Fix ObjCInterfaceDecl::inheritsDesignatedInitializers(), if there ↵Argyrios Kyrtzidis2014-04-261-0/+22
| | | | | | | | | | are no designated initializers in the super class hierarchy then it should return false. rdar://16692535 llvm-svn: 207332
* [Sema] Adjust Sema::getCurBlock()/getCurLambda() to take into account that ↵Argyrios Kyrtzidis2014-04-261-0/+21
| | | | | | | | | | | we may have switch CurContext due to class template instantiation. Fixes crash of the included test case. rdar://16527205 llvm-svn: 207325
* Add mangling for attribute enable_if. The demangling patch for libcxxabi is ↵Nick Lewycky2014-04-261-0/+20
| | | | | | still in review. llvm-svn: 207296
* Fixed Assert In CGRecordLoweringWarren Hunt2014-04-251-0/+9
| | | | | | | | | | | Prior to this patch, CGRecordLower assumed that virtual bases could not be placed before the nvsize of an object. This isn't true in Itanium mode, virtual bases are placed at dsize rather than vnsize and in the case of zero sized non-virtual bases nvsize can be larger than dsize. This patch fixes CGRecordLowering to avoid an assert and to clip bitfields properly in this case. A test case is included. llvm-svn: 207280
* CodeGen: add __yield intrinsic for ARMSaleem Abdulrasool2014-04-251-0/+10
| | | | | | | | | The __yield intrinsic generates a hint instruction to indicate that the thread is not performing any useful operations at the moment. This is for compatibility with MSVC, although, the intrinsic is also part of the ACLE, and is enabled globally as a result. llvm-svn: 207275
* Make test pass on 32 bit architectures.Benjamin Kramer2014-04-251-1/+1
| | | | llvm-svn: 207268
* Print detailed vector type information on diagnostics.Benjamin Kramer2014-04-2514-74/+74
| | | | | | | | | | | | | | | | | | | | | | We never aka vector types because our attributed syntax for it is less comprehensible than the typedefs. This leaves the user in the dark when the typedef isn't named that well. Example: v2s v; v4f w; w = v; The naming in this cases isn't even that bad, but the error we give is useless without looking up the actual typedefs. t.c:6:5: error: assigning to 'v4f' from incompatible type 'v2s' Now: t.c:6:5: error: assigning to 'v4f' (vector of 4 'float' values) from incompatible type 'v2s' (vector of 2 'int' values) We do this for all diagnostics that print a vector type. llvm-svn: 207267
OpenPOWER on IntegriCloud