summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce a -cc1 option "-dependency-graphviz" that determines headerDouglas Gregor2012-02-027-1/+156
| | | | | | dependencies and outputs them in GraphViz format. llvm-svn: 149575
* objc: don't crash if primary class is missing and continuation classFariborz Jahanian2012-02-022-0/+11
| | | | | | is declaring ivars. // rdar://10752081 llvm-svn: 149573
* Change the check for constant-conversion with width-1 bitfields so it ↵Eli Friedman2012-02-022-2/+8
| | | | | | doesn't suppress quite as many cases. Based off a testcase in the gcc testsuite. llvm-svn: 149572
* back out r149504Dylan Noblesmith2012-02-024-5/+15
| | | | | | Too many weird build failures. llvm-svn: 149571
* Per discussion on cfe-dev, remove '#error' and '#warning' from diagnostic text.Ted Kremenek2012-02-027-10/+22
| | | | llvm-svn: 149566
* objc2: add __has_feature(objc_default_synthesize_properties).Fariborz Jahanian2012-02-022-4/+15
| | | | | | // 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-016-24/+58
| | | | | | pop". llvm-svn: 149559
* Look for declaration of CFBridgingRetain/CFBridgingRetain beforeFariborz Jahanian2012-02-0111-69/+116
| | | | | | changing the diagnostic. Also use correct spelling for both. llvm-svn: 149554
* make: fix installation of generated header filesDylan Noblesmith2012-02-012-0/+10
| | | | | | | | | | | | The PROJ_SRC_DIR != PROJ_OBJ_DIR path was missing the directory creation logic that was in the path for non-generated headers. PR11903. (The oversight was copied and pasted from LLVM's Makefile.rules, where it apparently existed since time immemorial til it was corrected in r127325.) llvm-svn: 149551
* cmake: don't install config.h (v2)Dylan Noblesmith2012-02-011-0/+1
| | | | | | | | This header is private and shouldn't be used by clients. (This reverts r149540, reinstating r149496. False alarm.) llvm-svn: 149550
* Remove duplicated comment.Eric Christopher2012-02-011-1/+0
| | | | llvm-svn: 149544
* Fix comment.Eric Christopher2012-02-011-2/+2
| | | | llvm-svn: 149543
* cmake: revert r149496Dylan Noblesmith2012-02-011-1/+0
| | | | | | It *looks* like this caused PR11903, somehow. llvm-svn: 149540
* Make sure that imported definitions get completed before we addDouglas Gregor2012-02-012-31/+106
| | | | | | | anything into the corresponding DeclContext. Co-hacked with Sean; fixes <rdar://problem/10768928>. llvm-svn: 149535
* libclang: Mark clang_Cursor_isNull with CINDEX_LINKAGE to make it available ↵Benjamin Kramer2012-02-011-1/+1
| | | | | | | | on windows. Patch by Timothy J Fontaine! llvm-svn: 149533
* [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-012-1/+23
| | | | | | | | 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-017-6/+189
| | | | | | | | | | | 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-012-1/+14
| | | | llvm-svn: 149517
* Introduce the lambda scope before determining explicit captures, whichDouglas Gregor2012-02-016-116/+146
| | | | | | | | | | | | | 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
* [analyzer] Testing: add 2 new checkers to the buildbot script.Anna Zaks2012-02-011-1/+1
| | | | llvm-svn: 149514
* test/Driver/target.c: Relax expression for "gcc.exe" on win32.NAKAMURA Takumi2012-02-011-1/+1
| | | | llvm-svn: 149510
* include clang's config.h unconditionallyDylan Noblesmith2012-02-015-20/+7
| | | | | | | | | | | | | 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
* test/Modules/compiler_builtins.m: Appease Cygwin to add -D__need_wint_t.NAKAMURA Takumi2012-02-011-1/+1
| | | | | | | | On Cygwin, at first, <stddef.h> is included without __need_wint_t. Next, <stddef.h> is included with __need_wint_t, though Modules feature would not process <stddef.h> twice. Then, wint_t is not found in system headers. llvm-svn: 149500
* test/Modules/compiler_builtins.m: Mark this as XFAIL:win32. MS limits.h ↵NAKAMURA Takumi2012-02-011-0/+2
| | | | | | provides size_t. llvm-svn: 149499
* autoconf: add private config.h to clangDylan Noblesmith2012-02-011-0/+27
| | | | | | | | | This already exists in the CMake build, which is part of what makes building clang separately from llvm via cmake possible. This cleans up that discrepancy between the build systems (and sets the groundwork for configuring clang separately, too). llvm-svn: 149497
* cmake: don't install config.hDylan Noblesmith2012-02-011-0/+1
| | | | | | This header is private and shouldn't be used by clients. llvm-svn: 149496
* Frontend: fix comment typosDylan Noblesmith2012-02-011-3/+3
| | | | llvm-svn: 149495
* constexpr: check for overflow in pointer subtraction.Richard Smith2012-02-012-7/+32
| | | | | | | | | | | | | 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-013-3/+98
| | | | | | instead of the entire class definition. llvm-svn: 149474
* constexpr: overflow checking for integral and floating-point arithmetic.Richard Smith2012-02-013-7/+81
| | | | llvm-svn: 149473
* When providing code completions for a switch over a scoped enumerationDouglas Gregor2012-02-012-4/+26
| | | | | | 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-012-1/+3
| | | | | | | 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-013-3/+18
| | | | llvm-svn: 149467
* constexpr: add support for comparisons of pointer-to-members.Richard Smith2012-02-013-3/+76
| | | | llvm-svn: 149463
* Improve checking of explicit captures in a C++11 lambda expression:Douglas Gregor2012-02-017-52/+120
| | | | | | | | | | | | | | - Actually building the var -> capture mapping properly (there was an off-by-one error) - Keeping track of the source location of each capture - Minor QoI improvements, e.g, highlighing the prior capture if there are multiple captures, pointing at the variable declaration we found if we reject it. As part of this, add standard citations for the various semantic checks we perform, and note where we're not performing those checks as we should. llvm-svn: 149462
* Fix crash on invalid in microsoft anonymous struct extension.Nico Weber2012-02-012-4/+14
| | | | | | Fixes PR11847. Patch from Jason Haslam! llvm-svn: 149460
* Diagnose attempts to explicitly capture a __block variable in a lambda.Douglas Gregor2012-02-013-4/+22
| | | | llvm-svn: 149458
* Use the new Triple::getMacOSXVersion function in another place.Bob Wilson2012-01-314-29/+8
| | | | | | | I removed support for "*-darwin*-iphoneos" triples, since we now have iOS listed as a separate OS in the triples. llvm-svn: 149455
* Fix an assertion failure in isMacOSXVersionLT for IOS targets.Bob Wilson2012-01-311-4/+3
| | | | | | | Check if the triple OS is IOS instead of checking for arm/thumb architectures and check that before calling isMacOSXVersionLT. llvm-svn: 149454
* Make the callback object to Sema::CorrectTypo mandatory.Kaelyn Uhrain2012-01-3112-31/+30
| | | | llvm-svn: 149451
* Extend for-range temporary cleanups codegen test to catch the bug which EliRichard Smith2012-01-311-0/+7
| | | | | | fixed in r149440. llvm-svn: 149450
* objc-arc: In various diagnostics mention Fariborz Jahanian2012-01-3111-62/+62
| | | | | | | | CFBridgingRetain/CFBridgingRelease calls instead of __bridge_retained/__bridge_transfer casts as preferred way of moving cf objects to arc land. // rdar://10207950 llvm-svn: 149449
* constexpr: Treat INT_MIN % -1 as undefined behavior in C++11. Technically, itRichard Smith2012-01-312-6/+5
| | | | | | isn't, but this is just a (reported) defect in the wording. llvm-svn: 149448
OpenPOWER on IntegriCloud