summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* objective-C modern translator. More fixups for Fariborz Jahanian2013-02-071-0/+48
| | | | | | | modern meta-data abi translation. Still wip. // rdar://13138459 llvm-svn: 174672
* Add missing header from r174648Douglas Gregor2013-02-071-0/+3
| | | | llvm-svn: 174649
* Retain all hidden methods in the global method pool, because they may become ↵Douglas Gregor2013-02-074-0/+14
| | | | | | visible <rdar://problem/13172858>. llvm-svn: 174648
* Rename -fmodule-cache-path <blah> to -fmodules-cache-path=<blah> for ↵Douglas Gregor2013-02-0749-114/+114
| | | | | | consistency. llvm-svn: 174645
* Thread safety analysis: make sure that expressions in attributes are parsedDeLesley Hutchins2013-02-071-0/+13
| | | | | | in an unevaluated context. llvm-svn: 174644
* Testcase for r174477.Chad Rosier2013-02-071-0/+11
| | | | llvm-svn: 174640
* Enable overloading of OpenCL events - this is needed for the overloaded ↵Guy Benyei2013-02-071-0/+11
| | | | | | OpenCL builtin functions. llvm-svn: 174630
* FileCheckize volatile testTim Northover2013-02-071-3/+37
| | | | llvm-svn: 174627
* Only check for volatile memcpys in test.Tim Northover2013-02-071-1/+1
| | | | | | | | AArch64 handles aggFct's return struct slightly differently, leading to an extra memcpy. This test is fortunately only concerned about volatile copies, so we can modify the grep text to filter it. llvm-svn: 174621
* Add AArch64 wchar definition to testTim Northover2013-02-071-1/+1
| | | | | | This should allow it to pass if the default triple is AArch64 llvm-svn: 174620
* XFAIL test that's inappropriate for AArch64 ABITim Northover2013-02-071-0/+8
| | | | | | | | Only some ABIs require the "signext" attribute on parameters. On most platforms, however, it's a useful test so it's best not to limit it to some random arbitrary platform. llvm-svn: 174619
* Permit ABIs where the caller extends the result (test change).Tim Northover2013-02-071-1/+1
| | | | | | | | | This test was written to make sure *something* sane is generated, not to test any ABI's signedness semantics. This should allow the test to pass if AArch64 is the default target. llvm-svn: 174618
* Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei2013-02-075-0/+45
| | | | | | restrictions. llvm-svn: 174601
* Apply the pure-virtual odr rule to other constructs which can call overloadedNick Lewycky2013-02-071-0/+38
| | | | | | operators. llvm-svn: 174584
* Fix handling of module imports adding names to a DeclContext after qualifiedRichard Smith2013-02-073-6/+33
| | | | | | | | | | | | | | | | name lookup has been performed in that context (this probably only happens in C++). 1) Whenever we add names to a context, set a flag on it, and if we perform lookup and discover that the context has had a lookup table built but has the flag set, update all entries in the lookup table with additional names from the external source. 2) When marking a DeclContext as having external visible decls, mark the context in which lookup is performed, not the one we are adding. These won't be the same if we're adding another copy of a pre-existing namespace. llvm-svn: 174577
* -Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in ↵Alexander Kornienko2013-02-071-11/+29
| | | | | | | | | | | | | | | | | | | | | | unreachable code" was issued incorrectly. Summary: -Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable code" was issued incorrectly: 1. In actual unreachable code, but not immediately on a fall-through execution path "fallthrough annotation does not directly precede switch label" is better; 2. After default: in a switch with covered enum cases. Actually, these shouldn't be treated as unreachable code for our purpose. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D374 llvm-svn: 174575
* objective-C modern translator. Fix up the translatedFariborz Jahanian2013-02-072-6/+62
| | | | | | | metadata to handle ivar bitfields. This is wip. // rdar://13138459 llvm-svn: 174573
* AST dumping: indicate the previous declaration for a redeclaration, andRichard Smith2013-02-071-0/+13
| | | | | | | indicate the semantic DC if it's not the lexical DC. In passing, correct the ascii-art child marker for a child of a FriendDecl. llvm-svn: 174570
* Be a little more permissive with -fmodules-ignore-macro= by removing ↵Douglas Gregor2013-02-071-0/+7
| | | | | | everything after the second '=' if it is there. llvm-svn: 174567
* Introduce -fmodules-ignore-macro=NNN to ignore a macro when building/loading ↵Douglas Gregor2013-02-071-2/+22
| | | | | | | | | | | | | | | | | | | | | modules. The use of this flag enables a modules optimization where a given set of macros can be labeled as "ignored" by the modules system. Definitions of those macros will be completely ignored when building the module hash and will be stripped when actually building modules. The overall effect is that this flag can be used to drastically reduce the number of Eventually, we'll want modules to tell us what set of macros they respond to (the "configuration macros"), and anything not in that set will be excluded. However, that requires a lot of per-module information that must be accurate, whereas this option can be used more readily. Fixes the rest of <rdar://problem/13165109>. llvm-svn: 174560
* Detect when we end up trying to load conflicting module files.Douglas Gregor2013-02-063-0/+34
| | | | | | | | | | | | This can happen when one abuses precompiled headers by passing more -D options when using a precompiled hedaer than when it was built. This is intentionally permitted by precompiled headers (and is exploited by some build environments), but causes problems for modules. First part of <rdar://problem/13165109>, detecting when something when horribly wrong. llvm-svn: 174554
* Remove unneeded test. We have plenty of subgroup relations between warnings,Ted Kremenek2013-02-061-16/+0
| | | | | | and for those we care about we should have a general way of testing them. llvm-svn: 174531
* Accept and ignore the -fextended-identifiers option.Jordan Rose2013-02-061-0/+6
| | | | | | | | | | | | This was GCC's option to turn on UCN support, which we always have on now in C99 and C++ modes. Additionally, mark the -fno-extended-identifiers option as unsupported, since we don't support disabling UCNs in C99 and C++ modes. PR11538 llvm-svn: 174530
* Don't check whether a friend declaration is correctly formed when instantiating,Nick Lewycky2013-02-061-0/+7
| | | | | | we already checked it when parsing. llvm-svn: 174486
* Added test for r174461 that checks that the desired behavior also occurs in ↵Michael Gottesman2013-02-061-0/+8
| | | | | | | | ObjC++ alongside ObjC. \end paranoia. llvm-svn: 174471
* [analyzer]Revert part of r161511; suppresses leak false positives in C++Anna Zaks2013-02-063-23/+40
| | | | | | | | | | | This is a "quick fix". The underlining issue is that when a const pointer to a struct is passed into a function, we do not invalidate the pointer fields. This results in false positives that are common in C++ (since copy constructors are prevalent). (Silences two llvm false positives.) llvm-svn: 174468
* Changed CGObjCMac.cpp to add the marker externally_initialized to ↵Michael Gottesman2013-02-054-8/+16
| | | | | | | | | | | | | SELECTOR_REFERENCES in both the fragile and non-fragile API. This is to ensure that GlobalOpt in LLVM does not attempt to look through a selector reference to a method var name at compile time. I also added a test/updated old tests that need to recognize the new keyword. rdar://12580965. llvm-svn: 174461
* Change subexpressions to be visited in the CFG from left-to-right.Ted Kremenek2013-02-053-91/+183
| | | | | | | | | | | | | | | | | This is a more natural order of evaluation, and it is very important for visualization in the static analyzer. Within Xcode, the arrows will not jump from right to left, which looks very visually jarring. It also provides a more natural location for dataflow-based diagnostics. Along the way, we found a case in the analyzer diagnostics where we needed to indicate that a variable was "captured" by a block. -fsyntax-only timings on sqlite3.c show no visible performance change, although this is just one test case. Fixes <rdar://problem/13016513> llvm-svn: 174447
* [analyzer] Teach the analyzer to use a symbol for p when evaluatingAnna Zaks2013-02-051-0/+11
| | | | | | | | (void*)p. Addresses the false positives similar to the test case. llvm-svn: 174436
* [arcmt] Make sure the objc migrators work fine when used with a PCH.Argyrios Kyrtzidis2013-02-054-0/+55
| | | | | | rdar://13140508 llvm-svn: 174386
* [frontend] Don't put a PCH/PTH filename into the set of includes in the ↵Argyrios Kyrtzidis2013-02-051-0/+18
| | | | | | | | | | | | | preprocessor options; since only one of them is allowed in command-line, process them separately. Otherwise, if more than one is specified in the command-line, one is processed normally and the others are going to be treated and included as header files. Related to radar://13140508 llvm-svn: 174385
* Driver and option support for -gsplit-dwarf. This is a part ofEric Christopher2013-02-051-0/+19
| | | | | | the DWARF5 split dwarf proposal. llvm-svn: 174349
* Add some missing diagnostics for C++11 narrowing conversions.Richard Smith2013-02-052-15/+13
| | | | llvm-svn: 174337
* DeclPrinter: fix CXXConstructExpr printing with implicit default argumentDmitri Gribenko2013-02-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | | This is an improvement of r173630, that handles the following case: struct VirualDestrClass { VirualDestrClass(int arg); virtual ~VirualDestrClass(); }; struct ConstrWithCleanupsClass { ConstrWithCleanupsClass(const VirualDestrClass& cplx = VirualDestrClass(42)); }; ConstrWithCleanupsClass cwcNoArg; That was printed as: ConstrWithCleanupsClass cwcNoArg(); llvm-svn: 174296
* Drop value names from test to get -Asserts builds back to green.Benjamin Kramer2013-02-031-2/+2
| | | | llvm-svn: 174294
* CodeGen: Implement hint values for dynamic_cast as described in the Itanium ↵Benjamin Kramer2013-02-031-0/+53
| | | | | | | | | | | | | | | C++ ABI. This can yield dramatic speedups of dynamic_cast for simple inheritance trees, at least with libsupc++. Neither libcxxabi nor libcxxrt make use of this hint currently, it was never implemented because clang didn't support it. There was some concern about the number of class hierarchy walks this change introduces. If it turns out to be an issue we can add caching either at the cast pair level or even deeper, but we also do a lot of walks in Sema so this codepath is probably fairly optimized already. llvm-svn: 174293
* CodeGen: Mark the runtime function __dynamic_cast as readonly & nounwind.Benjamin Kramer2013-02-031-0/+2
| | | | | | This allows the optimizer to CSE dynamic_casts. llvm-svn: 174289
* clang/test/CodeGenCXX/debug-info-class.cpp: Tweak to unbreak test for a few ↵NAKAMURA Takumi2013-02-031-2/+6
| | | | | | | | | | targets. - Relax a expression for arm-gnueabi. - Exclude msvc to limit target triplets to add limited a few targets. Feel free to remove actions if guys thought they redundant. llvm-svn: 174278
* Revert "[analyzer] Model trivial copy/move ctors with an aggregate bind."Jordan Rose2013-02-022-103/+3
| | | | | | | | | | | ...again. The problem has not been fixed and our internal buildbot is still getting hangs. This reverts r174212, originally applied in r173951, then reverted in r174069. Will not re-apply until the entire project analyzes successfully on my local machine. llvm-svn: 174265
* PR15132: Replace "address expression must be an lvalue or a functionRichard Smith2013-02-0210-19/+41
| | | | | | | | | | | | | | designator" diagnostic with more correct and more human-friendly "cannot take address of rvalue of type 'T'". For the case of & &T::f, provide a custom diagnostic, rather than unhelpfully saying "cannot take address of rvalue of type '<overloaded function type>'". For the case of &array_temporary, treat it just like a class temporary (including allowing it as an extension); the existing diagnostic wording for the class temporary case works fine. llvm-svn: 174262
* Correctly classify T{} as an array temporary if T is an array of class type ↵Richard Smith2013-02-021-0/+7
| | | | | | with nontrivial destructor. llvm-svn: 174261
* Don't forget to run destructors when we create an array temporary of class type.Richard Smith2013-02-022-1/+54
| | | | llvm-svn: 174257
* On platforms which do not support ARC natively, do not mark ↵Michael Gottesman2013-02-021-3/+31
| | | | | | | | | objc_retain/objc_release as "nonlazybind". rdar://13108298. rdar://13129783. llvm-svn: 174253
* Generalize DebugInfo tests by avoiding explicit metadata numbersDavid Blaikie2013-02-0217-36/+39
| | | | | | | | | | | | | | | This addresses several (not all) debug info tests that use explicit metadata numbers. Wherever the same number appeared more than once in a test I used a named match to ensure the same number appeared in all those cases (this may still be overly constraining test cases as they may not have actually cared about that relationship). For one-off numbers I just replaced them with an unnamed regex. This may underconstrain poorly written test cases that were interested in checking that certain metadata nodes were related but didn't actually match on all the related nodes numbers. llvm-svn: 174247
* [analyzer] Always inline functions with bodies generated by BodyFarm.Anna Zaks2013-02-021-0/+24
| | | | | | | | Inlining these functions is essential for correctness. We often have cases where we do not inline calls. For example, the shallow mode and when reanalyzing previously inlined ObjC methods as top level. llvm-svn: 174245
* This patch makes "&Cls::purevfn" not an odr use. This isn't what the standardNick Lewycky2013-02-022-0/+27
| | | | | | | | | says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use. Also fixes a bug that caused us to not mark the function referenced just because we didn't want to mark it odr used. llvm-svn: 174242
* Merge "special" types from different modules in the AST reader.Douglas Gregor2013-02-013-0/+18
| | | | | | | | | Different modules may have different views of the various "special" types in the AST, such as the redefinition type for "id". Merge those types rather than only considering the redefinition types for the first AST file loaded. llvm-svn: 174234
* clang/test/CodeGenCXX/debug-info-class.cpp: Fixup for -Asserts.NAKAMURA Takumi2013-02-011-2/+3
| | | | llvm-svn: 174229
* Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko2013-02-015-0/+75
| | | | | | | | | | | | | | This change introduces a 'kind' attribute for the <Para> tag, that captures the kind of the parent block command. For example: \todo Meow. used to be just <Para>Meow.</Para>, but now it is <Para kind="todo">Meow.</Para> llvm-svn: 174216
* Add some missing PPC cpusBill Schmidt2013-02-012-0/+241
| | | | llvm-svn: 174215
OpenPOWER on IntegriCloud