summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* All the members of LVFlags always have the same value, replace the class withRafael Espindola2012-04-211-68/+46
| | | | | | a boolean. llvm-svn: 155299
* Fix regression in r154844. If necessary, defer computing adjusted destructorRichard Smith2012-04-213-17/+41
| | | | | | | exception specifications in C++11 until after we've parsed the exception specifications for nested classes. llvm-svn: 155293
* Remove unneeded code.Fariborz Jahanian2012-04-211-1/+1
| | | | llvm-svn: 155290
* Fix serialization of uninstantiated exception specifications. Patch by Li Kan,Richard Smith2012-04-212-0/+6
| | | | | | test by me. llvm-svn: 155289
* move some stuff to .rodataNuno Lopes2012-04-212-2/+2
| | | | llvm-svn: 155282
* SemaDeclCXX.cpp: Fix utf8 in comment.NAKAMURA Takumi2012-04-211-1/+1
| | | | llvm-svn: 155279
* Also highlight the member name.Matt Beaumont-Gay2012-04-211-2/+2
| | | | llvm-svn: 155274
* When declaring a template, check that the context doesn't already contain aRichard Smith2012-04-211-3/+22
| | | | | | | declaration of the same name. r155187 caused us to miss this if the prior declaration did not declare a type. llvm-svn: 155269
* Fix a QoI bug reported by a user.Matt Beaumont-Gay2012-04-211-2/+2
| | | | | | | | | | | Set the source location for the "member reference base type ... is not a structure or union" diag to point at the operator rather than the member name. If we're giving this diagnostic because of a typo'd '.' in place of a ';' at the end of a line, the caret previously pointed at the identifier on the following line, which isn't as helpful as it could be. Pointing the caret at the '.' makes it more obvious what the problem is. llvm-svn: 155267
* Link with Foundation whenever -fobjc-link-runtime is used. <rdar://10976177>Bob Wilson2012-04-211-2/+2
| | | | | | | The check for excluding libarclite on i386 MacOSX should not apply to Foundation. llvm-svn: 155263
* objective-c arc: With currnt documentation, Fariborz Jahanian2012-04-201-2/+2
| | | | | | | | objc_returns_inner_pointer attribute can be applied to methods only. Diagnsose otherwise, instead of crashing. // rdar://11253688 llvm-svn: 155245
* [analyzer] Run remove dead bindings right before leaving a function.Anna Zaks2012-04-209-117/+224
| | | | | | | | | | | | | | | | | | | | | This is needed to ensure that we always report issues in the correct function. For example, leaks are identified when we call remove dead bindings. In order to make sure we report a callee's leak in the callee, we have to run the operation in the callee's context. This change required quite a bit of infrastructure work since: - We used to only run remove dead bindings before a given statement; here we need to run it after the last statement in the function. For this, we added additional Program Point and special mode in the SymbolReaper to remove all symbols in context lower than the current one. - The call exit operation turned into a sequence of nodes, which are now guarded by CallExitBegin and CallExitEnd nodes for clarity and convenience. (Sorry for the long diff.) llvm-svn: 155244
* In r135308, -save-temps was modified to prevent a temporary file fromChad Rosier2012-04-201-7/+16
| | | | | | | | | | | | | | | | overwriting the input file. For example, clang -c foo.s -o foo.o -save-temps Unfortunately, the original patch didn't compare the paths of the input and output files. Thus, something like the following would fail to create foo.s. cd /tmp/obj clang -c ../src/foo.s -o foo.o -save-temps rdar://11252615 llvm-svn: 155224
* Fix bug where a class's (deleted) copy constructor would be implicitly given aRichard Smith2012-04-202-43/+29
| | | | | | | | non-const reference parameter type if the class had any subobjects with deleted copy constructors. This causes a rejects-valid if the class's copy constructor is explicitly defaulted (as happens for some implementations of std::pair etc). llvm-svn: 155218
* When generating the clang crash diagnostic script, strip out the -o flag.Chad Rosier2012-04-201-2/+3
| | | | | | | Add a FIXME comment. rdar://11283560 llvm-svn: 155207
* Add a little hack to emulate a clang crash, so the diagnostics generator can beChad Rosier2012-04-201-1/+1
| | | | | | tested. llvm-svn: 155205
* Pass -mfloat-abi= to linuxtools assembler.Evgeniy Stepanov2012-04-201-0/+4
| | | | llvm-svn: 155191
* Fix bug 12574 - Avoid infinite recursion in constructors and destructors ↵Timur Iskhodzhanov2012-04-201-2/+3
| | | | | | when using Microsoft C++ ABI llvm-svn: 155189
* Replace r155185 with a better fix, which also addresses PR12557. When lookingRichard Smith2012-04-201-3/+3
| | | | | | | | | up an elaborated type specifier in a friend declaration, only look for type declarations, per [basic.lookup.elab]p2. If we know that the redeclaration lookup for a friend class template in a dependent context finds a non-template, don't delay the diagnostic to instantiation time. llvm-svn: 155187
* Fix a bug which creduce found reducing PR12585.Richard Smith2012-04-201-1/+1
| | | | llvm-svn: 155185
* When generating the clang crash diagnostic script, strip out the -D, -F, and -IChad Rosier2012-04-201-0/+14
| | | | | | | | | | flags. We have preprocessed source, so we don't need these. No test case as it's fairly difficult to make the compiler crash on demand. I'll patiently wait for Ben to tell me how to do this in 2 lines of code. :) rdar://11283560 llvm-svn: 155180
* objective-arc: Retune my previous patch so warningFariborz Jahanian2012-04-192-26/+37
| | | | | | | is issued on weak property as receiver and not on any other use of a weak property. // rdar://10225276 llvm-svn: 155169
* In Parser::isCXXDeclarationSpecifier, consider a non-type identifierKaelyn Uhrain2012-04-191-2/+6
| | | | | | | | | | | | | | | followed by an identifier as declaration specificer (except for ObjC). This allows e.g. an out-of-line C++ member function definitions to be recognized as functions and not as variable declarations if the type name for the first parameter is not recognized as a type--say, when there is a function name shadowing an enum type name and the parameter is missing the "enum" keyword needed to distinguish the two. Note that returning TPResult::Error() instead of TPResult::True() appears to have the same end result, while TPResult::Ambiguous() results in a crash. llvm-svn: 155163
* objective-c arc: Issue warning under -Wreceiver-is-weak Fariborz Jahanian2012-04-192-6/+35
| | | | | | | if receiver is a 'weak' property, by type or by attribute. // rdar://10225276 llvm-svn: 155159
* Refactor the thread safety analysis so that it is easier to doDeLesley Hutchins2012-04-191-272/+318
| | | | | | path-sensitive analysis like handling of trylock expressions. llvm-svn: 155137
* objective-c modern translator: Further improving the lastFariborz Jahanian2012-04-191-14/+14
| | | | | | | patch fixing writing a spurious 'static' into the wrong place. // rdar://11275241 llvm-svn: 155130
* Thread safety analysis: split warnings into two groups: attribute warningsDeLesley Hutchins2012-04-191-48/+46
| | | | | | | | | | which are checked in the parser, and analysis warnings that require the full analysis. This allows attribute syntax to be checked independently of the full thread safety analysis. Also introduces a new warning for the case where a string is used as a lock expression; this allows the analysis to gracefully handle expressions that would otherwise cause a parse error. llvm-svn: 155129
* Fix a comment.Francois Pichet2012-04-191-1/+1
| | | | llvm-svn: 155107
* Add missing -Wc++98-compat warnings for initializer list initializations whichRichard Smith2012-04-191-0/+15
| | | | | | initialize references, create std::initializer_list objects, or call constructors. llvm-svn: 155105
* In mergeVisibility, if we already have an explicit visibility, keep it.Rafael Espindola2012-04-191-7/+11
| | | | | | | | This fixes the included testcase and lets us simplify the code a bit. It does require using mergeWithMin when merging class information to its members. Expand the comments to explain why that works. llvm-svn: 155103
* Now that we check visibility attributes in an appropriate order,Rafael Espindola2012-04-191-1/+1
| | | | | | | | | | | | | | | | | | there is no need for mergeVisibily to ever increase the visibility. Not doing so lets us replace an incorrect use of mergeVisibilityWithMin. The testcase struct HIDDEN RECT { int top; }; DEFAULT RECT foo = {0}; shows that we should give preference to one of the attributes instead of keeping the minimum. We still get this testcase wrong because mergeVisibily handles two explicit visibilities incorrectly, but this is a step in the right direction. llvm-svn: 155101
* Check ConsiderGlobalVisibility before using -fvisibility.Rafael Espindola2012-04-191-2/+4
| | | | llvm-svn: 155100
* The explicit bit in LV already tracks exactly the same information asRafael Espindola2012-04-191-6/+2
| | | | | | DHasExplicitVisibility. Simplify the code a bit. llvm-svn: 155099
* Move the point in the code where we handle -fvisibility=hidden. WithRafael Espindola2012-04-191-2/+4
| | | | | | | | | | | | the current implementation this should be a nop as explicit visibility takes precedence in mergeVisibility. The location chosen is such that attributes checked above it can force a symbol to be default. For example, an attribute is the variable or function. Attributes checked after this point, can only make the visibility more restrictive. An attribute in a type for example. llvm-svn: 155098
* Make setVisibility private and change users to mergeVisibility. This isRafael Espindola2012-04-191-7/+7
| | | | | | | | currently a nop as those users are the first merge or are a merge of a hidden explicit visibility, which always wins in the current implementation. llvm-svn: 155095
* modern objective-c translator: Fix writing a spurious 'static'Fariborz Jahanian2012-04-191-8/+31
| | | | | | | into the wrong place when rewriting a static function which declares block literals. // rdar://11275241 llvm-svn: 155084
* Implements boxed expressions for Objective-C. <rdar://problem/10194391>Patrick Beard2012-04-1919-121/+309
| | | | llvm-svn: 155082
* PR 12586: Fix assert while running libc++ testsuite: deal with exceptionRichard Smith2012-04-194-22/+19
| | | | | | | | | specifications on member function templates of class templates and other such nested beasties. Store the function template from which we are to instantiate an exception specification rather than trying to deduce it. Plus some additional test cases. llvm-svn: 155076
* Revert some Hexagon builtin commits to match reverts done to LLVM inChandler Carruth2012-04-183-766/+157
| | | | | | | | | | | | | | | | | | | r155047. See the LLVM log for the primary motivation: http://llvm.org/viewvc/llvm-project?rev=155047&view=rev Primary commit r154828: - Several issues were raised in review, and fixed in subsequent commits. - Follow-up commits also reverted, and which should be folded into the original before reposting: - r154837: Re-add the 'undef BUILTIN' thing to fix the build. - r154928: Fix build warnings, re-add (and correct) header and license - r154937: Typo fix. Please resubmit this patch with the relevant LLVM resubmission. llvm-svn: 155048
* objective-c: Issue diagnostic when an implicitFariborz Jahanian2012-04-181-3/+20
| | | | | | | property accessor (getter) missing, instead of crashing. // rdar://11273060 llvm-svn: 155036
* Suppress -Wunused-variable warning in -Asserts buildMatt Beaumont-Gay2012-04-181-1/+1
| | | | llvm-svn: 155011
* VerifyICE: Pass PartialDiagnostics by reference.Benjamin Kramer2012-04-181-4/+5
| | | | llvm-svn: 155005
* MIPS: Followup to r154606. Expand list of accepted MIPS target features in ↵Simon Atanasyan2012-04-181-1/+4
| | | | | | the MipsTargetInfoBase::setFeatureEnabled() routine. llvm-svn: 154998
* fix GCC version comparison wrt. equal patch suffices (and squash two typos)Gabor Greif2012-04-181-2/+3
| | | | llvm-svn: 154997
* Adds a FixedCompilationDatabase to be able to specify tool parametersManuel Klimek2012-04-181-0/+27
| | | | | | at the command line. llvm-svn: 154989
* As per John McCall comment:Francois Pichet2012-04-181-4/+4
| | | | | | Follow up to r154924: check that we are in a static CMethodDecl to enable the Microsoft bug emulation regarding access to protected member during PTM creation. Not just any static function. llvm-svn: 154982
* fix display of source lines with null charactersSeth Cantrell2012-04-181-2/+5
| | | | llvm-svn: 154981
* Nicer display of unprintable source, and fix caret display for non-ascii textSeth Cantrell2012-04-181-159/+439
| | | | | | | | | | | | | Unprintable source in diagnostics is transformed to a printable form and then displayed with reversed colors if possible. Unprintable characters are displayed as <U+NNNN> while bytes that do not represent valid characters are shown as <XX>. Column adjustments to diagnostic carets, highlighted ranges, and fixups are made both for characters escaped as above and for characters which are printable but take up more than a single column. llvm-svn: 154980
* Calling setVisibility directly only makes (some) sense when the visibility isRafael Espindola2012-04-181-3/+3
| | | | | | explicit. llvm-svn: 154969
* PR12569: Instantiate exception specifications of explicit instantiationsRichard Smith2012-04-172-3/+15
| | | | | | and explicit specializations of function templates appropriately. llvm-svn: 154956
OpenPOWER on IntegriCloud