summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Teach BugReporter (extensive diagnostics) to emit a diagnostic when a loop ↵Ted Kremenek2013-02-081-0/+631
| | | | | | | | body is skipped. Fixes <rdar://problem/12322528>. llvm-svn: 174736
* [libclang] Add a test to make sure annotation works fine in the presence ofArgyrios Kyrtzidis2013-02-081-0/+27
| | | | | | | | | | | 'override' on the method. This was fixed in a previous commit, generally handling attributes that are at the end of the declaration. rdar://13140589 llvm-svn: 174734
* objective-C modern translation: Fix another random translation bugFariborz Jahanian2013-02-081-0/+43
| | | | | | | involving property getter expressions on rhs of property setter. // rdar://13138459 llvm-svn: 174729
* objective-C modern translator. Fixes a trivialFariborz Jahanian2013-02-081-0/+20
| | | | | | | rewriting bug where #ifdef ended up on the same line as the attribute declaration. llvm-svn: 174719
* Improve filechecking of volatile test.Tim Northover2013-02-081-37/+110
| | | | | | | | | | | | My previous attempt was extremely deficient, allowing more volatiles to be introduced and not even checking all of the ones that are present. This attempt doesn't try to keep track of the values stored or offsets within particular objects, just that the correct objects are accessed in a correctly volatile manner throughout. llvm-svn: 174700
* CMake: Include Clang unit tests in check-clang target in standalone builds.Jordan Rose2013-02-081-19/+25
| | | | | | | | | | | | | | | | Also, remove CLANG_BUILD_TESTS option. It won't have consistent behavior between standalone and non-standalone builds, so I'm not going to bother hooking it up for standalone builds. LLVM_BUILD_TESTS will continue to control unit test inclusion in the "all" target in non-standalone builds. Finally, fix the default value of CLANG_INCLUDE_TESTS, which was being set to the boolean value of "LLVM_INCLUDE_TESTS", i.e. OFF, rather than actually reading the variable ${LLVM_INCLUDE_TESTS}! If you picked up my earlier commit, YOU WILL HAVE TO MANUALLY SET THIS OPTION BACK ON. My apologies! Part two of r174691 (allow the unit tests to be built in standalone mode). llvm-svn: 174698
* Fix test failure by making sure this file isn't identical to any other fileNick Lewycky2013-02-081-0/+1
| | | | | | | included in the same test. Clang gets confused about whether it's already built a module for this file, when running on a content-addressible filesystem. llvm-svn: 174694
* Fix conflict between r174685 and r174645 (rename -fmodule-cache-path <foo> ↵Richard Smith2013-02-081-1/+1
| | | | | | to -fmodules-cache-path=<foo>). llvm-svn: 174690
* [libclang] Attribute visitation happens out-of-source-order, make sureArgyrios Kyrtzidis2013-02-082-2/+30
| | | | | | | | | we annotate properly when there is an attribute and not skip type specs if the attribute is after the declaration. rdar://13129077 llvm-svn: 174689
* Use the target address space value when mangling names.Tanya Lattner2013-02-082-0/+8
| | | | llvm-svn: 174688
* Fix stack overflow and improve performance when a module contains manyRichard Smith2013-02-083-0/+2017
| | | | | | | | | | | | | overloads of a name by claiming that there are no lookup results for that name in modules while loading the names from the module. Lookups in deserialization really don't want to find names which they themselves are in the process of introducing. This also has the pleasant side-effect of automatically caching PCH lookups which found no names. The runtime here is still quadratic in the number of overloads, but the constant is lower. llvm-svn: 174685
* objective-C modern translator. Generate #lineFariborz Jahanian2013-02-081-0/+40
| | | | | | | info in the translated code under -g only. // rdar://13138170 llvm-svn: 174684
* Teach subframework header lookup to suggest modules <rdar://problem/13176200>.Douglas Gregor2013-02-087-0/+17
| | | | llvm-svn: 174683
* [analyzer] Report bugs when freeing memory with offset pointerAnna Zaks2013-02-071-0/+100
| | | | | | | | | | | | | | | | | The malloc checker will now catch the case when a previously malloc'ed region is freed, but the pointer passed to free does not point to the start of the allocated memory. For example: int *p1 = malloc(sizeof(int)); p1++; free(p1); // warn From the "memory.LeakPtrValChanged enhancement to unix.Malloc" entry in the list of potential checkers. A patch by Branden Archer! llvm-svn: 174678
* [analyzer] Add pointer escape type param to checkPointerEscape callbackAnna Zaks2013-02-074-0/+61
| | | | | | | | | | | | | | The checkPointerEscape callback previously did not specify how a pointer escaped. This change includes an enum which describes the different ways a pointer may escape. This enum is passed to the checkPointerEscape callback when a pointer escapes. If the escape is due to a function call, the call is passed. This changes previous behavior where the call is passed as NULL if the escape was due to indirectly invalidating the region the pointer referenced. A patch by Branden Archer! llvm-svn: 174677
* [analyzer] Don't reinitialize static globals more than once along a pathAnna Zaks2013-02-072-0/+36
| | | | | | | | | | | This patch makes sure that we do not reinitialize static globals when the function is called more than once along a path. The motivation is code with initialization patterns that rely on 2 static variables, where one of them has an initializer while the other does not. Currently, we reset the static variables with initializers on every visit to the function along a path. llvm-svn: 174676
* Form the default -fmodules-cache-path= properly.Douglas Gregor2013-02-071-1/+1
| | | | llvm-svn: 174674
* 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
OpenPOWER on IntegriCloud