summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [frontend] Don't allow a mapping to a warning override an error/fatal mapping.Chad Rosier2012-02-031-0/+7
| | | | | | rdar://10736625 llvm-svn: 149662
* Note whether a lambda is mutable in the LambdaScopeInfo; this information ↵Eli Friedman2012-02-031-0/+2
| | | | | | will be necessary to handle references to captured variables. llvm-svn: 149660
* Do not show macro expansion in strncat warnings, which can be defined asAnna Zaks2012-02-031-7/+16
| | | | | | a builtin. llvm-svn: 149657
* objc: Issue diagnostic when receiver type is a forward class declaration andFariborz Jahanian2012-02-031-1/+5
| | | | | | | it is treated as of 'id' type resulting in multiple method lookup. // rdar://10686120 llvm-svn: 149653
* Replace the old --with-cxx-* configure options with a single ↵Rafael Espindola2012-02-032-61/+13
| | | | | | | | | --with-gcc-toolchain that just uses the new toolchain probing logic. This fixes linking with -m32 on 64 bit systems (the /32 dir was not being added to the search). llvm-svn: 149652
* Rename -dependency-graphviz to -dependencncy-dotDouglas Gregor2012-02-023-4/+5
| | | | llvm-svn: 149645
* Add some code to accurately perform odr-used marking for variables per the ↵Eli Friedman2012-02-023-24/+104
| | | | | | C++11 rules. llvm-svn: 149641
* Further enhance comment for property in continuation class.Fariborz Jahanian2012-02-021-1/+4
| | | | llvm-svn: 149639
* unnecessary include of TargetMachine.h?Andrew Trick2012-02-021-1/+0
| | | | llvm-svn: 149638
* Initialize the user defined conversion function to null if this is an ↵Benjamin Kramer2012-02-021-0/+1
| | | | | | | | aggregate initialization from an initializer list. Found by valgrind. llvm-svn: 149627
* objc: comment the code which allows narroing of property objectFariborz Jahanian2012-02-021-0/+3
| | | | | | type in continuation class. llvm-svn: 149625
* objective-c: When redeclaraing in continuation class a 'readonly'Fariborz Jahanian2012-02-021-5/+12
| | | | | | | | property to 'readwrite', also allow redeclaration of property type to a narrowring object type. // rdar://10790488 llvm-svn: 149614
* Back out my heinous hack that tricked the module generation mechanismDouglas Gregor2012-02-025-90/+95
| | | | | | | | | | | | | | | | | | | | into using non-absolute system includes (<foo>)... ... and introduce another hack that is simultaneously more heineous and more effective. We whitelist Clang-supplied headers that augment or override system headers (such as float.h, stdarg.h, and tgmath.h). For these headers, Clang does not provide a module mapping. Instead, a system-supplied module map can refer to these headers in a system module, and Clang will look both in its own include directory and wherever the system-supplied module map suggests, then adds either or both headers. The end result is that Clang-supplied headers get merged into the system-supplied module for the C standard library. As a drive-by, fix up a few dependencies in the _Builtin_instrinsics module. llvm-svn: 149611
* Pacify gcc's -Wreturn-typeMatt Beaumont-Gay2012-02-021-0/+1
| | | | llvm-svn: 149610
* Move the code that sets the AddressSafetyAlexander Potapenko2012-02-021-8/+7
| | | | | | | | | | attribute into CodeGenModule::SetLLVMFunctionAttributesForDefinition(). Previously it resided in CodeGenModule::GetOrCreateLLVMFunction, which for some reason wasn't called for ObjC class methods, see http://code.google.com/p/address-sanitizer/issues/detail?id=33 llvm-svn: 149605
* r149587 revertedAnton Yartsev2012-02-021-3/+1
| | | | llvm-svn: 149594
* Fix for PR10657 (http://llvm.org/bugs/show_bug.cgi?id=10657)Anton Yartsev2012-02-021-1/+3
| | | | | | extern inline case considered llvm-svn: 149587
* Split Sema::MarkDeclarationReferenced into multiple functions; the ↵Eli Friedman2012-02-029-212/+254
| | | | | | additional entry points are needed to implement C++11 odr-use marking correctly. No functional change in this patch; I'll actually make the change which fixes the odr-use marking in a followup patch. llvm-svn: 149586
* [analyzer] Fix a false positive in the CFArrayCreate check that surfacesAnna Zaks2012-02-021-1/+10
| | | | | | | | | | the the code like this (due to x and &x being the same value but different size): void* x[] = { ptr1, ptr2, ptr3 }; CFArrayCreate(NULL, (const void **) &x, count, NULL); llvm-svn: 149579
* constexpr:Richard Smith2012-02-022-15/+166
| | | | | | | * support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11 * check for unspecified values in pointer comparisons and pointer subtractions llvm-svn: 149578
* Introduce a -cc1 option "-dependency-graphviz" that determines headerDouglas Gregor2012-02-024-0/+145
| | | | | | dependencies and outputs them in GraphViz format. llvm-svn: 149575
* objc: don't crash if primary class is missing and continuation classFariborz Jahanian2012-02-021-0/+2
| | | | | | is declaring ivars. // rdar://10752081 llvm-svn: 149573
* Change the check for constant-conversion with width-1 bitfields so it ↵Eli Friedman2012-02-021-2/+2
| | | | | | doesn't suppress quite as many cases. Based off a testcase in the gcc testsuite. llvm-svn: 149572
* back out r149504Dylan Noblesmith2012-02-023-4/+14
| | | | | | Too many weird build failures. llvm-svn: 149571
* Per discussion on cfe-dev, remove '#error' and '#warning' from diagnostic text.Ted Kremenek2012-02-021-2/+10
| | | | llvm-svn: 149566
* objc2: add __has_feature(objc_default_synthesize_properties).Fariborz Jahanian2012-02-021-0/+1
| | | | | | // rdar://10770497 llvm-svn: 149565
* r149474 went a bit too far when combined with type caching. If we wantEric Christopher2012-02-011-2/+5
| | | | | | | | | a full type go ahead and emit it if we currently only have a forward declaration. Fixes gdb bots for gdb1090.exp and call-ar-st.exp. llvm-svn: 149560
* Reject mismatched "#pragma GCC visibility push" and "#pragma GCC visibility ↵Rafael Espindola2012-02-012-14/+35
| | | | | | pop". llvm-svn: 149559
* Look for declaration of CFBridgingRetain/CFBridgingRetain beforeFariborz Jahanian2012-02-011-11/+28
| | | | | | changing the diagnostic. Also use correct spelling for both. llvm-svn: 149554
* Remove duplicated comment.Eric Christopher2012-02-011-1/+0
| | | | llvm-svn: 149544
* Fix comment.Eric Christopher2012-02-011-2/+2
| | | | llvm-svn: 149543
* Make sure that imported definitions get completed before we addDouglas Gregor2012-02-011-31/+100
| | | | | | | anything into the corresponding DeclContext. Co-hacked with Sean; fixes <rdar://problem/10768928>. llvm-svn: 149535
* [libclang] Make sure we don't ever leave a StoredDiagnostic associated withArgyrios Kyrtzidis2012-02-011-10/+34
| | | | | | a SourceManager that has already been deleted, rdar://10768346. llvm-svn: 149532
* Add missing dependency to unbreak the CMake buildDouglas Gregor2012-02-011-0/+1
| | | | llvm-svn: 149531
* size() == 0 -> empty().David Chisnall2012-02-011-1/+1
| | | | | | Spotted by rjmcall. llvm-svn: 149526
* [analyzer] Fix a crash in CheckerContext::isCLibraryFunction for C++Anna Zaks2012-02-011-1/+7
| | | | | | | | declarations with special names. A patch by Dmitri Gribenko. llvm-svn: 149525
* Add a new compiler warning, which flags anti-patterns used as the sizeAnna Zaks2012-02-012-4/+116
| | | | | | | | | | | argument in strncat. The warning is ignored by default since it needs more qualification. TODO: The warning message and the note are messy when strncat is a builtin due to the macro expansion. llvm-svn: 149524
* Diagnose the restriction on default arguments in C++11 [expr.prim.lambda]p5.Douglas Gregor2012-02-011-1/+7
| | | | llvm-svn: 149517
* Introduce the lambda scope before determining explicit captures, whichDouglas Gregor2012-02-012-108/+101
| | | | | | | | | | | | | cleans up and improves a few things: - We get rid of the ugly dance of computing all of the captures in data structures that clone those of CapturingScopeInfo, centralizing the logic for accessing/updating these data structures - We re-use the existing capture logic for 'this', which actually works now. Cleaned up some diagnostic wording in minor ways as well. llvm-svn: 149516
* include clang's config.h unconditionallyDylan Noblesmith2012-02-014-19/+6
| | | | | | | | | | | | | And remove HAVE_CLANG_CONFIG_H, now that the header is generated in the autoconf build, too. (clang r149497 / llvm r149498) Also include the config.h header after all other headers, per the LLVM coding standards. It also turns out WindowsToolChain.cpp wasn't using the config header at all, so that include's just deleted now. llvm-svn: 149504
* constexpr: check for overflow in pointer subtraction.Richard Smith2012-02-011-6/+23
| | | | | | | | | | | | | This is a mess. According to the C++11 standard, pointer subtraction only has undefined behavior if the difference of the array indices does not fit into a ptrdiff_t. However, common implementations effectively perform a char* subtraction first, and then divide the result by the element size, which can cause overflows in some cases. Those cases are not considered to be undefined behavior by this change; perhaps they should be. llvm-svn: 149490
* Compatability fix for SwitchInst refactoring.Stepan Dyatkovskiy2012-02-012-3/+3
| | | | | | | | | | | | | | | | | The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want. What was done: 1. Changed semantics of index inside the getCaseValue method: getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous. 2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned. 3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment. 4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst. 4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor. 4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor. Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang. llvm-svn: 149482
* Revert r149363 which was part a series of commits that were reverted in llvmArgyrios Kyrtzidis2012-02-016-41/+42
| | | | | | | | | | | | | | | | | commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c. Original log: ConstantArray::get() (for strings) is going away, use ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149477
* Remove redundant checks in CXXRecordDecl::isCLike(), as suggested by Sebastian.Argyrios Kyrtzidis2012-02-011-5/+1
| | | | llvm-svn: 149476
* For pass-by-value record arguments to functions emit a forward declEric Christopher2012-02-012-3/+75
| | | | | | instead of the entire class definition. llvm-svn: 149474
* constexpr: overflow checking for integral and floating-point arithmetic.Richard Smith2012-02-011-7/+38
| | | | llvm-svn: 149473
* When providing code completions for a switch over a scoped enumerationDouglas Gregor2012-02-011-4/+1
| | | | | | type, be sure to add the qualifier for the enumeration type. llvm-svn: 149471
* constexpr: Unlike other incomplete types, 'void' cannot possibly be completed asRichard Smith2012-02-011-1/+2
| | | | | | | a literal type. Disallow it as the return type of a constexpr function declaration. llvm-svn: 149469
* constexpr: require 'this' to point to an object in a constexpr method call.Richard Smith2012-02-011-1/+5
| | | | llvm-svn: 149467
* constexpr: add support for comparisons of pointer-to-members.Richard Smith2012-02-011-3/+51
| | | | llvm-svn: 149463
OpenPOWER on IntegriCloud