summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Expand argument diagnostic for too few arguments to give the numberEric Christopher2010-04-164-14/+28
| | | | | | | | of arguments both seen and expected. Fixes PR6501. llvm-svn: 101441
* Convert libCIndex to use the new native EXPORTED_SYMBOL_FILE mechanism.Dan Gohman2010-04-164-83/+169
| | | | | | | | libCIndex also has a CMakeLists.txt file which has its own code for using the exports file. To preserve existing functionality, create a separate darwin-specific exports file for use by this CMakeLists.txt code. llvm-svn: 101440
* Fix a bug in caret-line-pruning logic that only happens when we have aDouglas Gregor2010-04-162-6/+23
| | | | | | | | source line wider than the terminal where the associated fix-it line is longer than the caret line. Previously, we would crash in this case, which was rather unfortunate. Fixes <rdar://problem/7856226>. llvm-svn: 101426
* Audit uses of Sema::LookupSingleName for those lookups that areDouglas Gregor2010-04-156-15/+43
| | | | | | | | | | | intended for redeclarations, fixing those that need it. Fixes PR6831. This uncovered an issue where the C++ type-specifier-seq parsing logic would try to perform name lookup on an identifier after it already had a type-specifier, which could also lead to spurious ambiguity errors (as in PR6831, but with a different test case). llvm-svn: 101419
* Feed proper source-location information into Sema::LookupSingleResult,Douglas Gregor2010-04-1512-68/+107
| | | | | | | | in case it ends up doing something that might trigger diagnostics (template instantiation, ambiguity reporting, access reporting). Noticed while working on PR6831. llvm-svn: 101412
* Better support USRs for anonymous enums, structs, by including the location ↵Ted Kremenek2010-04-151-3/+42
| | | | | | | | where the tag was declared. WIP. llvm-svn: 101403
* Specify temporary file for -emit-llvm output in test case so that we don't ↵Ted Kremenek2010-04-151-1/+1
| | | | | | | | deposit the file in the original source directory. llvm-svn: 101402
* Do not generate USRs for declarations with 'no linkage' except for enums, ↵Ted Kremenek2010-04-151-7/+28
| | | | | | | | structs, typedefs. Those still need work to disambiguate them across translation units. llvm-svn: 101401
* Improve the bit-field too wide error message.Anders Carlsson2010-04-154-7/+7
| | | | llvm-svn: 101384
* Diagnose attempts to throw an abstract class type.Douglas Gregor2010-04-153-0/+17
| | | | llvm-svn: 101381
* Fix PR 6844, a regression caused by the introduction of llvm_unreachable for ↵Ted Kremenek2010-04-152-25/+71
| | | | | | | | | | the default case in GRExprEngine::Visit (in r101129). Instead, enumerate all Stmt cases and have no 'default' case in the switch statement. When we encounter a Stmt we don't handle, we should explicitly add it to the switch statement. llvm-svn: 101378
* Split adding the primary virtual base offsets out into a separate pass. This ↵Anders Carlsson2010-04-153-35/+158
| | | | | | fixes a bug where we would lay out virtual bases in the wrong order. llvm-svn: 101373
* Fix a few cases where enum constant handling was usingDouglas Gregor2010-04-152-6/+10
| | | | | | | | | | ASTContext::getTypeSize() rather than ASTContext::getIntWidth() for the width of an integral type. The former includes padding for bools (to the target's size) while the latter does not, so we woud end up zero-extending bools to the target width when we shouldn't. Fixes a crash-on-valid in the included test. llvm-svn: 101372
* clang -cc1: Add a -fno-bitfield-type-align option, for my own testing purposes.Daniel Dunbar2010-04-154-2/+19
| | | | llvm-svn: 101370
* Tweak spelling (Bitfield -> BitField)Daniel Dunbar2010-04-153-5/+5
| | | | llvm-svn: 101369
* Teach -fixit to modify all of its inputs instead of just the main file, unlessNick Lewycky2010-04-157-44/+117
| | | | | | -fixit-at specified a particular fixit to fix, or the -o flag was used. llvm-svn: 101359
* Include sender address in completion log.Ted Kremenek2010-04-151-0/+2
| | | | llvm-svn: 101358
* Tidy up comment.Daniel Dunbar2010-04-151-4/+3
| | | | llvm-svn: 101357
* Add TargetInfo::useBitfieldTypeAlignment().Daniel Dunbar2010-04-153-7/+18
| | | | | | | | | | | | | | | - Used to determine whether the alignment of the type in a bit-field is respected when laying out structures. The default is true, targets can override this as needed. - This is designed to correspond to the PCC_BITFIELD_TYPE_MATTERS macro in gcc. The AST/Sema implementation only affects one line, unless I have forgotten something. I'd appreciate further review. - IRgen still needs to be updated to fully support this (which is effectively PR5591). llvm-svn: 101356
* Driver/Frontend: Add support for -mllvm, which forwards options to the LLVM ↵Daniel Dunbar2010-04-155-1/+38
| | | | | | | | option parser. - Note that this is a behavior change, previously -mllvm at the driver level forwarded to clang -cc1. The driver does a little magic to make sure that '-mllvm -disable-llvm-optzns' works correctly, but other users will need to be updated to use -Xclang. llvm-svn: 101354
* IRgen: Change CGBitFieldInfo to take the AccessInfo as constructor ↵Daniel Dunbar2010-04-153-20/+38
| | | | | | | | arguments, it is now an immutable object. Also, add some checking of various invariants that should hold on the CGBitFieldInfo access. llvm-svn: 101345
* IRgen: Eliminate now unused fields from CGBitFieldInfo.Daniel Dunbar2010-04-153-22/+15
| | | | llvm-svn: 101344
* IRgen: (Reapply 101222, with fixes) Move EmitStoreThroughBitfieldLValue to ↵Daniel Dunbar2010-04-152-88/+291
| | | | | | | | | | | | | | | | use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself. - Sadly, this doesn't seem to give any .ll size win so far. It is possible to make this routine significantly smarter & avoid various shifting, masking, and zext/sext, but I'm not really convinced it is worth it. It is tricky, and this is really instcombine's job. - No intended functionality change; the test case is just to increase coverage & serves as a demo file, it worked before this commit. The new fixes from r101222 are: 1. The shift to the target position needs to occur after the value is extended to the correct size. This broke Clang bootstrap, among other things no doubt. 2. Swap the order of arguments to OR, to get a tad more constant folding. llvm-svn: 101339
* Rewrite handling of 64-bit palignr intrinsics to be vector shuffles.Eric Christopher2010-04-154-8/+49
| | | | | | | | | Stop multiplying constant by 8 accordingly in the header and change intrinsic definition for what types we expect. Add to existing palignr test to check that we're emitting the correct things. llvm-svn: 101332
* Teach ASTVector::append() about the case where 'NumInputs' is 0. This ↵Ted Kremenek2010-04-151-0/+4
| | | | | | | | hopefully fixes a crash in InitListExpr's ctor. llvm-svn: 101328
* Add simple python server for recording code completion timings.Ted Kremenek2010-04-151-0/+39
| | | | llvm-svn: 101327
* Add optional timing logging for code completion results. This causes a UDP ↵Ted Kremenek2010-04-151-0/+87
| | | | | | | | | packet containing the time taken for the code completion to be sent to a designated server (which is specified using a compile-time -D flag). llvm-svn: 101326
* Warn about non-aggregate classes with no user-declared constructorsDouglas Gregor2010-04-156-9/+43
| | | | | | | that have reference or const scalar members, since those members can never be initializer or modified. Fixes <rdar://problem/7804350>. llvm-svn: 101316
* Always diagnose and complain about problems inDouglas Gregor2010-04-146-79/+116
| | | | | | | | | | ResolveAddressOfOverloadedFunction when asked to complain. Previously, we had some weird handshake where ResolveAddressOfOverloadedFunction expected its caller to handle some of the diagnostics but not others, and yet there was no way for the caller to know which case we were in. Eliminate this madness, fixing <rdar://problem/7765884>. llvm-svn: 101312
* Fix 80-cols violtaionsAlexis Hunt2010-04-141-4/+7
| | | | llvm-svn: 101311
* Once we've emitted a fatal diagnostic, keep counting errors but with aDouglas Gregor2010-04-144-3/+22
| | | | | | | | | | | | | | separate count of "suppressed" errors. This way, semantic analysis bits that depend on the error count to determine whether problems occured (e.g., some template argument deduction failures, jump-scope checking) will not get confused. The actual problem here is that a missing #include (which is a fatal error) could cause the jump-scope checker to run on invalid code, which it is not prepared to do. Trivial fix for both <rdar://problem/7775941> and <rdar://problem/7775709>. llvm-svn: 101297
* Make CXLanguage_Invalid the first enum value (with '0' as its value) in ↵Ted Kremenek2010-04-141-2/+2
| | | | | | CXLanguageKind. llvm-svn: 101287
* Fix a -pedantic spurious warning involving @dynamic.Fariborz Jahanian2010-04-142-1/+21
| | | | llvm-svn: 101284
* improve altivec c++ support by adding casts, patch byChris Lattner2010-04-143-229/+78
| | | | | | Anton Yartsev! llvm-svn: 101281
* Thread a Scope pointer into BuildRecoveryCallExpr to help typoDouglas Gregor2010-04-144-6/+15
| | | | | | | correction find names when a call failed. Fixes <rdar://problem/7853795>. llvm-svn: 101278
* Teach typo correction about various language keywords. We can'tDouglas Gregor2010-04-1413-105/+447
| | | | | | | | | | | | | generally recover from typos in keywords (since we would effectively have to mangle the token stream). However, there are still benefits to typo-correcting with keywords: - We don't make stupid suggestions when the user typed something that is similar to a keyword. - We can suggest the keyword in a diagnostic (did you mean "static_cast"?), even if we can't recover and therefore don't have a fix-it. llvm-svn: 101274
* Return the corrected DeclarationName from Sema::CorrectTypo ratherDouglas Gregor2010-04-142-19/+23
| | | | | | | | than just a bool indicating that correction occurred. No actual functionality change (it's still always used like a bool), but this refactoring will be used to support typo correction to keywords. llvm-svn: 101259
* IRgen/NeXT: Simplify to use AST record layout for getting offsets instead of theDaniel Dunbar2010-04-141-13/+4
| | | | | | IRgen record layout, which this code doesn't need to depend on. llvm-svn: 101257
* When diagnosing suspicious precedence or assignments, move the fix-itDouglas Gregor2010-04-145-43/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | that adds parentheses from the main diagnostic down to a new note. This way, when the fix-it represents a choice between two options, each of the options is associted with a note. There is no default option in such cases. For example: /Users/dgregor/t.c:2:9: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses] if (x & y == 0) { ^~~~~~~~ /Users/dgregor/t.c:2:9: note: place parentheses around the & expression to evaluate it first if (x & y == 0) { ^ ( ) /Users/dgregor/t.c:2:9: note: place parentheses around the == expression to silence this warning if (x & y == 0) { ^ ( ) llvm-svn: 101249
* Move GRStmtNodeBuilder::MakeNode() out of line. No functionality change.Zhongxing Xu2010-04-142-26/+28
| | | | llvm-svn: 101239
* Add support for CXXBoolLiteralExpr.Zhongxing Xu2010-04-143-1/+15
| | | | llvm-svn: 101238
* Use direct assignment instead of user defined conversion.Zhongxing Xu2010-04-141-3/+3
| | | | llvm-svn: 101236
* Speculatively revert "IRgen: Move EmitStoreThroughBitfieldLValue to use new ↵Daniel Dunbar2010-04-142-258/+88
| | | | | | CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.", I think it might be breaking bootstrap. llvm-svn: 101235
* Improve line marker directive locations, patch by Jordy RoseChris Lattner2010-04-143-4/+5
| | | | llvm-svn: 101226
* add builtin for __builtin_vsprintf, patch by Paul DaveyChris Lattner2010-04-141-0/+1
| | | | llvm-svn: 101224
* IRgen: Move EmitStoreThroughBitfieldLValue to use new ↵Daniel Dunbar2010-04-142-88/+258
| | | | | | | | | | CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself. - Sadly, this doesn't seem to give any .ll size win so far. It is possible to make this routine significantly smarter & avoid various shifting, masking, and zext/sext, but I'm not really convinced it is worth it. It is tricky, and this is really instcombine's job. - No intended functionality change; the test case is just to increase coverage & serves as a demo file, it worked before this commit. llvm-svn: 101222
* IRgen: Tweak CGBitFieldInfo doxyments & add an accessor.Daniel Dunbar2010-04-141-0/+10
| | | | llvm-svn: 101221
* make the token paste avoidance logic turn "..." into ".. ." instead of ". . ."Chris Lattner2010-04-145-8/+20
| | | | | | when avoiding paste. Patch by David Peixotto! llvm-svn: 101218
* implement altivec.h and a bunch of support code, patch by Anton Yartsev!Chris Lattner2010-04-149-5/+2109
| | | | llvm-svn: 101215
* remove some obsolete super-handling code that I forgot to zap.Chris Lattner2010-04-141-30/+0
| | | | llvm-svn: 101212
OpenPOWER on IntegriCloud