summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* In ms mode, a move assignment operator shouldn't mark a copy ctor as deleted.Nico Weber2012-01-231-11/+15
| | | | | | | | | | | | | MSVC2010's pair class has a move assignment operator but no explicit copy constructor, which makes it unusable without this change. For symmetry, let move copy constructors not mark the default assignment operator as deleted either. Both changes match cl.exe's behavior. Fixes pr11826. Also update the standard excerpt to point to the right paragraph. llvm-svn: 148675
* Make sure the AST correctly represents lvalue-to-rvalue conversions where ↵Eli Friedman2012-01-234-9/+21
| | | | | | appropriate. llvm-svn: 148673
* Fix -Wswitch to warn about out of bounds enum cases even when there's a defaultDavid Blaikie2012-01-221-32/+28
| | | | | | | | | For consistency with GCC & reasonable sanity. The FIXME suggests that the original author was perhaps using the default check for some other purpose, not realizing the more obvious limitation/false-negatives it creates, but this doesn't seem to produce any regressions & fixes the included test. llvm-svn: 148649
* In Microsoft Mode, disable the C++11 strict integral conversion rules for ↵Francois Pichet2012-01-211-1/+2
| | | | | | enumerator that were introduced with r148439. Otherwise MSVC headers won't compile in C++ 11 mode. llvm-svn: 148642
* Add -Wswitch-enum-redundant-default.David Blaikie2012-01-211-2/+8
| | | | | | | | | | | | | | | | | | | This warning acts as the complement to the main -Wswitch-enum warning (which warns whenever a switch over enum without a default doesn't cover all values of the enum) & has been an an-doc coding convention in LLVM and Clang in my experience. The purpose is to ensure there's never a "dead" default in a switch-over-enum because this would hide future -Wswitch-enum errors. The name warning has a separate flag name so it can be disabled but it's grouped under -Wswitch-enum & is on-by-default because of this. The existing violations of this rule in test cases have had the warning disabled & I've added a specific test for the new behavior (many negative cases already exist in the same test file - and none regressed - so I didn't add more). Reviewed by Ted Kremenek ( http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120116/051690.html ) llvm-svn: 148640
* lib/Frontend/InitHeaderSearch.cpp: [Cygwin] Add 4.5.3.NAKAMURA Takumi2012-01-211-0/+1
| | | | llvm-svn: 148637
* [Cygwin] Abandon Cygwin-1.5 and g++-3. Use g++-4.3 and higher on Cygwin-1.7.NAKAMURA Takumi2012-01-212-14/+0
| | | | llvm-svn: 148636
* [analyzer] It's possible to have a non PointerType expression evaluate to a ↵Anna Zaks2012-01-211-2/+2
| | | | | | Loc value. When this happens, use the default type. llvm-svn: 148631
* Remove redundant argument.Rafael Espindola2012-01-212-6/+3
| | | | llvm-svn: 148628
* [analyzer] Make VLA checker taint aware. Anna Zaks2012-01-213-34/+65
| | | | | | Also, slightly modify the diagnostic message in ArrayBound and DivZero (still use 'taint', which might not mean much to the user, but plan on changing it later). llvm-svn: 148626
* Add an assertion that our use-marking actually covers all uses of a ↵Eli Friedman2012-01-211-0/+7
| | | | | | variable. The assertion doesn't cover quite as much as it should, but it's a good start, at least. llvm-svn: 148625
* Fix some comments relating to ExpressionEvaluationContexts. Get rid of a ↵Eli Friedman2012-01-213-15/+10
| | | | | | couple of uses of ConstantEvaluated which don't make sense. llvm-svn: 148624
* Fix code so that a SkipUntil will ignore semicolons when skipping aRichard Trieu2012-01-211-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function body. This keeps the brace count accurate to prevent additional errors. Also, moved the caret from the brace to the function name. Code: class F{ int Foo{ return 1; } }; Fixed error: parameters.cc:1:14: error: function definition does not declare parameters class F{ int Foo{ return 1; } }; ^ 1 error generated. Old errors: parameters.cc:1:17: error: function definition does not declare parameters class F{ int Foo{ return 1; } }; ^ parameters.cc:1:30: error: expected ';' after class class F{ int Foo{ return 1; } }; ^ ; parameters.cc:1:31: error: expected external declaration class F{ int Foo{ return 1; } }; ^ 3 errors generated. llvm-svn: 148621
* Add obvious missing call to MarkDeclarationReferenced.Eli Friedman2012-01-211-0/+1
| | | | llvm-svn: 148611
* Make clang's AST model sizeof and typeof with potentially-evaluated operands ↵Eli Friedman2012-01-214-20/+34
| | | | | | correctly, similar to what we already do with typeid. llvm-svn: 148610
* arg migrator: change all "assign" of object propertiesFariborz Jahanian2012-01-211-9/+11
| | | | | | to "strong" when migrating from GC. // rdar://10532449 llvm-svn: 148607
* Fix the code completion string for variadic macros with more than oneDouglas Gregor2012-01-211-32/+21
| | | | | | | argument, which was broken and very ugly (and even had a test case to make *sure* it was broken and ugly). Fixes <rdar://problem/10609117>. llvm-svn: 148606
* Handle thread safety attributes on functions with separate definitions and ↵DeLesley Hutchins2012-01-201-24/+25
| | | | | | declarations. llvm-svn: 148599
* Delayed template instantiation of late-parsed attributes.DeLesley Hutchins2012-01-203-7/+43
| | | | llvm-svn: 148595
* Instantiate dependent attributes when instantiating templates.DeLesley Hutchins2012-01-204-11/+15
| | | | llvm-svn: 148592
* The 'l' length modifier makes sense with the scanlist conversion specifier.Ted Kremenek2012-01-201-0/+1
| | | | llvm-svn: 148586
* When adding types to the context chain for record types, just emitEric Christopher2012-01-202-3/+57
| | | | | | | | | a forward declaration unless we already have a type. We can fill it in later if it's actually used. Fixes PR11345 llvm-svn: 148584
* rename -ccc-host-triple into -targetSebastian Pop2012-01-202-2/+2
| | | | llvm-svn: 148582
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-2049-221/+106
| | | | llvm-svn: 148577
* Add ability to specifiy 'restrict' on parameters of builtins, and correct ↵Ted Kremenek2012-01-201-0/+3
| | | | | | this oversight for scanf functions. llvm-svn: 148573
* Per PR 11814, use Monospace instead of Andale Mono.Ted Kremenek2012-01-201-1/+1
| | | | llvm-svn: 148567
* [analyzer] Add taint awareness to DivZeroChecker.Anna Zaks2012-01-201-11/+26
| | | | llvm-svn: 148566
* arc migrator: replace "retain" attribute with "strong"Fariborz Jahanian2012-01-201-4/+6
| | | | | | | which have same semantics in mrr as well as arr. // rdar://10688312 llvm-svn: 148559
* use llvm:Attributes instead of unsignedKostya Serebryany2012-01-201-10/+10
| | | | llvm-svn: 148554
* Enhance Lexer::makeFileCharRange to check for ranges inside a macro argumentArgyrios Kyrtzidis2012-01-201-11/+61
| | | | | | | expansion, in which case it returns a file range in the location where the argument was spelled. llvm-svn: 148551
* Replace a dubious use of SmallVectorImpl with a proper copy.Benjamin Kramer2012-01-201-3/+4
| | | | llvm-svn: 148549
* Extract the (InputKind, std::string) pair used to describe inputs toDouglas Gregor2012-01-2010-88/+78
| | | | | | | the front end into its own class, FrontendInputFile, to make it easier to introduce new per-input data. No functionality change. llvm-svn: 148546
* Localize variable, remove unused assignment.Benjamin Kramer2012-01-201-5/+1
| | | | | | Found by the clang static analyzer. llvm-svn: 148544
* Remove unused variables.Benjamin Kramer2012-01-202-4/+1
| | | | | | Found by clang's own static analyzer. llvm-svn: 148542
* Reenable DeadStoresChecker under --analyze, and move the ↵Ted Kremenek2012-01-202-4/+5
| | | | | | IdempotentOperationsChecker to the 'experimental' category. Fixes <rdar://problem/10146347>. llvm-svn: 148533
* Implement checker that looks for calls to mktemps and friends that have ↵Ted Kremenek2012-01-202-3/+107
| | | | | | fewer than 6 Xs. Implements <rdar://problem/6336672>. llvm-svn: 148531
* Turn 'SecuritySyntaxChecker' into a "meta" security checker for insecure ↵Ted Kremenek2012-01-202-10/+86
| | | | | | | | | APIs. Now multiple checks are exposed as separate checkers, but CheckerManager only creates one Checker object. llvm-svn: 148525
* Remove PotentiallyPotentiallyEvaluated, and replace it with a much simpler ↵Eli Friedman2012-01-206-169/+75
| | | | | | and less error-prone way of handling the relevant cases. Towards marking of whether a declaration is used more accurately. llvm-svn: 148522
* [analyzer] Add socket API as a source of taint.Anna Zaks2012-01-201-0/+27
| | | | llvm-svn: 148518
* [analyzer] Skip casts when determining taint dependencies + prettyAnna Zaks2012-01-201-0/+25
| | | | | | printing. llvm-svn: 148517
* [analyzer] Add a utility method that allows to find the macro name usedAnna Zaks2012-01-201-0/+13
| | | | | | | | | at the given location. This could be useful when checkers' logic depends on whether a function is called with a given macro argument. llvm-svn: 148516
* An instantiation of a constexpr static data member in a class template isRichard Smith2012-01-191-0/+1
| | | | | | constexpr. llvm-svn: 148505
* Extend the error of invalid token after declarations to include fixits for Richard Trieu2012-01-193-24/+26
| | | | | | !=, %=, ^=, &=, *=, -=, |=, /=, <<=, <=, >=, and >>= to =. llvm-svn: 148499
* Introduce Lexer::getSourceText() that returns a string for the sourceArgyrios Kyrtzidis2012-01-191-0/+42
| | | | | | that the given source range encompasses. llvm-svn: 148481
* Introduce Lexer::makeFileCharRange() that accepts a token source rangeArgyrios Kyrtzidis2012-01-191-0/+29
| | | | | | and returns a character range with file locations. llvm-svn: 148480
* For Lexer's isAt[Start/End]OfMacroExpansion add an out parameter for the macroArgyrios Kyrtzidis2012-01-193-19/+24
| | | | | | | | | start/end location. It is commonly needed after calling the function; with this way we avoid recalculating it. llvm-svn: 148479
* Extend unwind.h with the ARM unwinder interface.Evgeniy Stepanov2012-01-191-0/+35
| | | | | | | These declarations come from the sample code in the "Exception Handling ABI for the ARM Architecture" document. llvm-svn: 148469
* A few style changes.Tanya Lattner2012-01-191-6/+3
| | | | | | | Change CheckVectorLogicalOperands to pass params by ref. Add another test case. llvm-svn: 148452
* Remove the now-unused CorrectTypoContext enum.Kaelyn Uhrain2012-01-191-72/+1
| | | | llvm-svn: 148441
* constexpr: converted constant expression handling for enumerator values, caseRichard Smith2012-01-185-69/+318
| | | | | | | | | | values and non-type template arguments of integral and enumeration types. This change causes some legal C++98 code to no longer compile in C++11 mode, by enforcing the C++11 rule that narrowing integral conversions are not permitted in the final implicit conversion sequence for the above cases. llvm-svn: 148439
OpenPOWER on IntegriCloud