summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't warn about -Wno-foo where foo is an unknown warning option. ExplicitlyMatt Beaumont-Gay2011-06-031-1/+3
| | | | | | passing -Wunknown-warning-option will re-enable warnings about -Wno-foo. llvm-svn: 132570
* Warn about missing parentheses for conditional operator.Hans Wennborg2011-06-031-39/+107
| | | | | | | | | | Warn in cases such as "x + someCondition ? 42 : 0;", where the condition expression looks arithmetic, and has a right-hand side that looks boolean. This (partly) addresses http://llvm.org/bugs/show_bug.cgi?id=9969 llvm-svn: 132565
* Make -Wignored-qualifiers point to the first ignored qualifier.Hans Wennborg2011-06-031-16/+12
| | | | | | | | In code such as "char* volatile const j()", Clang warns that "volatile const" will be ignored. Make it point to the first ignored qualifier, and simplify the code a bit. llvm-svn: 132563
* Simplify.Devang Patel2011-06-031-4/+6
| | | | llvm-svn: 132560
* Fix typedef's context.Devang Patel2011-06-031-2/+3
| | | | llvm-svn: 132557
* We were looking at /usr/lib only if the distro had multilib. This is bogus:Rafael Espindola2011-06-031-2/+7
| | | | | | | | | | we look in /usr/lib to find crt1.o, and that depends only on where libc is installed. This fixes the case of using a different gcc installation in a distro without multilib. llvm-svn: 132551
* Add support for centos.Rafael Espindola2011-06-031-4/+9
| | | | llvm-svn: 132550
* 80-column cleanup.Eric Christopher2011-06-031-2/+2
| | | | llvm-svn: 132548
* Improve the instantiation of static data members inDouglas Gregor2011-06-031-8/+26
| | | | | | | Sema::RequireCompleteExprType() a bit more, setting the point of instantiation if needed, and skipping explicit specializations entirely. llvm-svn: 132547
* Revert r132544. Accidental commit. I got confused with the Tortoise SVN menu.Francois Pichet2011-06-032-3/+1
| | | | llvm-svn: 132546
* (no commit message)Francois Pichet2011-06-032-1/+3
| | | | llvm-svn: 132544
* 80-col cleanup.Eric Christopher2011-06-031-5/+11
| | | | llvm-svn: 132543
* Separate out these paths a bit by architecture. There are likely otherEric Christopher2011-06-031-2/+3
| | | | | | places this is a problem. llvm-svn: 132542
* Add multi-arch include support for Ubuntu 11.11 with gcc 4.6.0.Eric Christopher2011-06-031-0/+23
| | | | | | | | Patch by Tobias Hunger! Fixes PR10008 llvm-svn: 132541
* Copy IsWarnIfUnused too when making a copy of a MacroInfo.Benjamin Kramer2011-06-031-0/+1
| | | | | | Found by valgrind. llvm-svn: 132540
* My testing shows that function stat has no problem with trailing separators. ↵Francois Pichet2011-06-031-4/+0
| | | | | | | | | | | (tested on Windows and Darwin). This fixes a bug on Windows: clang c:\test.cpp Here the call stat("c:") is not recognized as a directory (must be "c:\"). llvm-svn: 132539
* Correctly revert r131347: function explicit specialization at class scope.Francois Pichet2011-06-031-1/+1
| | | | | | I'll try to implement this functionality again soon. llvm-svn: 132536
* Clean up the "non-POD memaccess" stuff some. This adds a properly namedChandler Carruth2011-06-031-16/+10
| | | | | | | | | | | | | | diagnostic group to cover the cases where we have definitively bad behavior: dynamic classes. It also rips out the existing support for POD-based checking. This didn't work well, and triggered too many false positives. I'm looking into a possibly more principled way to warn on the fundamental buggy construct here. POD-ness isn't the critical aspect anyways, so a clean slate is better. This also removes some silliness from the code until the new checks arrive. llvm-svn: 132534
* Untabify and fix whitespace.NAKAMURA Takumi2011-06-031-17/+17
| | | | llvm-svn: 132531
* When performing template argument deduction given a function argumentDouglas Gregor2011-06-033-3/+17
| | | | | | | | | of incomplete array type, attempt to complete the array type. This was made much easier by Chandler's addition of RequireCompleteExprType(), which I've tweaked (slightly) to improve the consistency of the DeclRefExpr. Fixes PR7985. llvm-svn: 132530
* When checking the instantiation of a default template argument againstDouglas Gregor2011-06-032-10/+15
| | | | | | | | | | | | | | | the template parameter, perform the checking as a "specified" template argument rather than a "deduced" template argument; the latter implies stricter type checking that is not permitted for default template arguments. Also, cleanup our handling of substitution of explicit template arguments for a function template. We were actually performing some substitution of default arguments at this point! Fixes PR10069. llvm-svn: 132529
* Introduce additional abbreviations into the AST writer forDouglas Gregor2011-06-033-13/+184
| | | | | | | DeclRefExprs, IntegerLiterals, and others, reducing Cocoa PCH size by ~1% and C++ header size by ~2.5%. From Jonathan Turner! llvm-svn: 132528
* We already have support for using c++ headers from a custom location.Rafael Espindola2011-06-021-26/+53
| | | | | | | | | | | | | Before this patch we would still link with the system libstdc++. It worked fine most of the time, but would break if the used headers were a lot newer than the system libraries. This patch changes the driver to use the libraries corresponding to the headers the user selected. This fixes, for example, using 4.5 headers in a system with gcc 4.1. llvm-svn: 132497
* Add Debian wheezy/sid to ToolChains.cpp. Patch by Michael Wild. PR10064.Eli Friedman2011-06-021-4/+9
| | | | llvm-svn: 132489
* [PCH] Store the offsets of source location file entries and go through themArgyrios Kyrtzidis2011-06-022-9/+27
| | | | | | | | | | in ASTReader::validateFileEntries(). This avoids going through all source location entries and fixes the performance regression. Many thanks to Doug for the hint! (rdar://9530587) llvm-svn: 132481
* Change how we link libprofile_rt.a. While at it, refactor the code a bit.Rafael Espindola2011-06-021-40/+23
| | | | llvm-svn: 132474
* Add -fno-gnu89-inline.Rafael Espindola2011-06-021-1/+3
| | | | llvm-svn: 132468
* Reverts the Tooling changes as requested by Chris.Manuel Klimek2011-06-028-1312/+1
| | | | llvm-svn: 132462
* Implement -fgnu89-inline. Fixes PR10041.Rafael Espindola2011-06-024-2/+8
| | | | llvm-svn: 132460
* Tweak code completions for Objective-C Key-Value Observing. TheDouglas Gregor2011-06-021-1/+22
| | | | | | | | +keyPathsForValuesAffecting<Key> completion was mislabeled as an instance method, and +automaticallyNotifiesObserversOf<Key> was missing entirely. Fixes <rdar://problem/9516762>. llvm-svn: 132452
* Fix 80-column violation.Francois Pichet2011-06-021-3/+6
| | | | llvm-svn: 132447
* Add stuff for o32 ABI conformance.Akira Hatanaka2011-06-022-3/+64
| | | | llvm-svn: 132443
* Fix an incorrect warning about explicit template specializations forDouglas Gregor2011-06-011-1/+1
| | | | | | nested types, from Michael Han! llvm-svn: 132431
* Add the necessary -L option for finding libprofile_rt.a. It might be a goodRafael Espindola2011-06-011-0/+5
| | | | | | | idea at some point to split out the directories where we install our runtime libraries. llvm-svn: 132425
* The expression in a noexcept exception-specification is aDouglas Gregor2011-06-011-0/+1
| | | | | | | constant-expression, and, therefore, an unevaluated operand. Make it so. llvm-svn: 132400
* Implement comparisons between nullptr and Objective-C objectDouglas Gregor2011-06-011-2/+2
| | | | | | pointers. Fixes PR10052. llvm-svn: 132397
* Even a return statement of an expression with a dependent type in a voidNick Lewycky2011-06-011-20/+23
| | | | | | function might need to clean up its temporaries. Fixes PR10057. llvm-svn: 132390
* [PCH] Be conservative and check all the files the PCH references to see ifArgyrios Kyrtzidis2011-06-011-0/+97
| | | | | | | | a file was modified since the time the PCH was created. The parser is not fit to deal with stale PCHs, too many invariants do not hold up. rdar://9530587. llvm-svn: 132389
* Microsoft friend acting as a forward declaration; try#2. Now only 2 lines.Francois Pichet2011-06-011-3/+7
| | | | llvm-svn: 132387
* This patch implements an AST matching framework that allows to writeManuel Klimek2011-05-313-30/+595
| | | | | | | | | | | tools that match on the C++ ASTs. The main interface is in ASTMatchers.h, an example implementation of a tool that removes redundant .c_str() calls is in the example RemoveCStrCalls.cpp. Various contributions: Zhanyong Wan, Chandler Carruth, Marcin Kowalczyk, Wei Xu, James Dennett. llvm-svn: 132374
* Revert 132332 (Microsoft friend as a forward declaration), John McCall ↵Francois Pichet2011-05-311-39/+0
| | | | | | pointed out a better/simpler way to do it. llvm-svn: 132369
* Robustify objc method type description (subroutine type) by walking ↵Devang Patel2011-05-311-11/+6
| | | | | | parameters directly. llvm-svn: 132368
* List objective-c ineterfaces as public types in dwarf debug info output.Devang Patel2011-05-311-0/+22
| | | | llvm-svn: 132361
* List c++ class type as public type in dwarf debug info output.Devang Patel2011-05-312-2/+13
| | | | llvm-svn: 132357
* Ensure we enter an unevaluated context when instantiating a noexceptAlexis Hunt2011-05-311-0/+1
| | | | | | expression. Fixes bug raised by hhinnant to cfe-dev llvm-svn: 132350
* Driver/Clang: Simplify code to use arch enumerations.Daniel Dunbar2011-05-311-13/+12
| | | | llvm-svn: 132338
* Recreate the DeclContext before adding the implicit friend forward ↵Francois Pichet2011-05-311-0/+2
| | | | | | declaration. This should fix the asserting buildbot. llvm-svn: 132333
* For compatibility with MSVC, a friend declaration also act as a forward ↵Francois Pichet2011-05-311-0/+37
| | | | | | | | | | | | | | declaration if the tag name is not already declared. The tag name is declared in the next outermost non record scope. Example: class A { friend class B; B* b; }; B* global_b; llvm-svn: 132332
* Whenever we instantiate a static data member, make sure to define any newNick Lewycky2011-05-312-33/+37
| | | | | | | | | vtables! Fixes PR10020 This also allows us to revert the part of r130023 which added a big loop around the template instantiation. llvm-svn: 132331
* Expand the coverage of the warning for constants on the RHS of logical operands:Chandler Carruth2011-05-311-6/+8
| | | | | | | | | | | | return f() || -1; where the user meant to write '|'. This bootstraps without any additional warnings. Patch by Richard Trieu. llvm-svn: 132327
OpenPOWER on IntegriCloud