summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* add a new driver-level -ferror-limit=412 option, which causes clang to stopChris Lattner2010-04-073-0/+11
| | | | | | | | | | | | | | | | | emitting diagnostics after it has produced that many errors. Give this a default value of 20 which produces plenty of errors for people to fix before recompiling but not so many that their entire console scrolls away when the compiler gets confused. The experience looks like this: $ clang foo.c <tons of crap> foo.c:102:3: error: unknown type name 'somethingbad' somethingbad x; ^ fatal error: too many errors emitted, stopping now 36 warnings and 20 errors generated. llvm-svn: 100689
* add clang -cc1 level support for "-ferror-limit 42"Chris Lattner2010-04-076-5/+19
| | | | llvm-svn: 100687
* Return early from Sema::MarkDeclarationReferenced when we know thereDouglas Gregor2010-04-072-2/+11
| | | | | | | | | isn't any extra work to perform. Also, don't check for unused parameters when the warnings will be suppressed anyway. Improves performance of -fsyntax-only on 403.gcc's combine.c by ~2.5%. <rdar://problem/7836787> llvm-svn: 100686
* add capabilities to stop emitting errors after some limit.Chris Lattner2010-04-073-0/+17
| | | | | | Right now the limit is 0 (aka disabled) llvm-svn: 100684
* Don't emit an 'unused expression' warning for '||' and '&&' expressions that ↵Ted Kremenek2010-04-072-12/+28
| | | | | | | | contain assignments or similar side-effects. llvm-svn: 100676
* Instead of counting totally diagnostics, split the count into a countChris Lattner2010-04-0714-24/+35
| | | | | | | | | | | | | | | of errors and warnings. This allows us to emit something like this: 2 warnings and 1 error generated. instead of: 3 diagnostics generated. This also stops counting 'notes' because they are just follow-on information about the previous diag, not a diagnostic in themselves. llvm-svn: 100675
* convert to -verify mode.Chris Lattner2010-04-071-2/+3
| | | | llvm-svn: 100674
* Improve handling of friend types in several ways:Douglas Gregor2010-04-079-75/+117
| | | | | | | | | | | - When instantiating a friend type template, perform semantic analysis on the resulting type. - Downgrade the errors concerning friend type declarations that do not refer to classes to ExtWarns in C++98/03. C++0x allows practically any type to be befriended, and ignores the friend declaration if the type is not a class. llvm-svn: 100635
* Split Sema::ActOnFriendTypeDecl into Sema::CheckFriendTypeDecl (forDouglas Gregor2010-04-072-35/+63
| | | | | | | | semantic analysis) and Sema::ActOnFriendTypeDecl (the action callback). This is a prerequisite for improving template instantiation of friend type declarations. llvm-svn: 100633
* @llvm.sqrt isn't really close enough to C's sqrt to justify emitting callsJohn McCall2010-04-072-17/+46
| | | | | | | | to the intrinsic, even when math-errno is off. Fixes rdar://problem/7828230 by falling back on the library function. llvm-svn: 100613
* a ridiculous amount of propagation through the backend later, Chris Lattner2010-04-071-2/+9
| | | | | | | | | | | | | | | | have the code generate slap a srcloc metadata on inline asm nodes. This allows us to diagnose invalid inline asms with such nice diagnostics as: <inline asm>:1:2: error: unrecognized instruction abc incl %eax ^ asm.c:2:12: note: generated from here __asm__ ("abc incl %0" : "+r" (X)); ^ 2 diagnostics generated. llvm-svn: 100608
* Fix comment.Zhongxing Xu2010-04-071-2/+2
| | | | llvm-svn: 100604
* Update checker build.Ted Kremenek2010-04-071-1/+1
| | | | llvm-svn: 100603
* Deprecate CXXScopeSpec::isSet() in favor of isNotEmpty() or isValid().Jeffrey Yasskin2010-04-071-4/+18
| | | | llvm-svn: 100600
* Teach -Wsign-compare to treat 1 << blah as "idiomatically non-negative".John McCall2010-04-072-0/+16
| | | | | | Fixes a spurious warning in LLVM. llvm-svn: 100595
* Fix crash in StoreManager::CastRegion() when the base region is a type with ↵Ted Kremenek2010-04-072-7/+16
| | | | | | 0 size. llvm-svn: 100594
* Check access for the implicit calls to destructors that occur when weJohn McCall2010-04-074-2/+21
| | | | | | | | have a temporary object in C++. Also fix a tag mismatch that Doug noticed. llvm-svn: 100593
* Fix CIndex crash on invalid code reported in <rdar://problem/7833619>.Ted Kremenek2010-04-072-2/+7
| | | | llvm-svn: 100589
* Improve on diagnostics when an objc class is used asFariborz Jahanian2010-04-075-14/+15
| | | | | | a stand-alone type declaration. llvm-svn: 100588
* Implement code completion for Objective-C method declarations andDouglas Gregor2010-04-076-1/+346
| | | | | | | | | | | | | | | | definitions, e.g., after - or - (id) we'll find all of the "likely" instance methods that one would want to declare or define at this point. In the latter case, we only produce results whose return types match "id". llvm-svn: 100587
* Minor clean up.Fariborz Jahanian2010-04-062-21/+0
| | | | llvm-svn: 100583
* default access for synthesize ivar is @protect.Fariborz Jahanian2010-04-062-1/+4
| | | | | | Fixes radar 7823675. llvm-svn: 100582
* Patch to not build ivar ASTs when they are ilegallyFariborz Jahanian2010-04-064-19/+26
| | | | | | declared in categories. llvm-svn: 100577
* Devote a special diagnostic to the typoJohn McCall2010-04-063-0/+26
| | | | | | | (void*) someFunction(5, 10, 15, 20); where the cast is presumably meant to be to 'void'. llvm-svn: 100574
* Teach MemRegion::getBaseRegion() about ObjCIvarRegions. We want to treatTed Kremenek2010-04-062-7/+29
| | | | | | | them the same way as fields. This fixes a regression in RegionStore::RemoveDeadbindings() that emerged from going to the cluster-based analysis. llvm-svn: 100570
* Implement the protected access restriction ([class.protected]), which requiresJohn McCall2010-04-0615-310/+969
| | | | | | | | that protected members be used on objects of types which derive from the naming class of the lookup. My first N attempts at this were poorly-founded, largely because the standard is very badly worded here. llvm-svn: 100562
* When code completion produces an overload set as its results (e.g.,Douglas Gregor2010-04-062-3/+3
| | | | | | | while we're completing in the middle of a function call), also produce "ordinary" name results that show what can be typed at that point. llvm-svn: 100558
* Do not produce semicolons at the end of code-completion resultsDouglas Gregor2010-04-064-27/+13
| | | | llvm-svn: 100557
* Only prove macros as code-completion results when we're in a caseDouglas Gregor2010-04-062-23/+1
| | | | | | | statement or for ordinary names. This means that we won't show macros when completing, e.g., member expressions such as "p->". llvm-svn: 100555
* Fix ccc-analyzer's handling of quoted arguments in the build command. Fixes ↵Ted Kremenek2010-04-061-6/+1
| | | | | | PR 6791.[B llvm-svn: 100551
* When sending a message to "id", apply some heuristics to try to narrowDouglas Gregor2010-04-062-0/+110
| | | | | | | down the set of code-completion results based on Objective-C conventions. llvm-svn: 100548
* add a testcase that the integrated assembler rejects, this verifies Chris Lattner2010-04-061-0/+8
| | | | | | that the integrated assembler is working. llvm-svn: 100545
* teach clang to install the inline asm diagnostic handler,Chris Lattner2010-04-062-3/+78
| | | | | | | | | | | | | | | | | allowing backend errors to be mapped through clang's diagnostics subsystem, including the backend location info. We now get: $ clang asm.c -c -o t.o -integrated-as <inline asm>:1:2: error: unrecognized instruction abc incl %eax ^ 1 diagnostic generated. With colors, and correct "# diagnostics generated". llvm-svn: 100543
* reduce indentation, tidy.Chris Lattner2010-04-062-115/+122
| | | | llvm-svn: 100537
* improved wording around ABIBlaine Garst2010-04-061-5/+6
| | | | llvm-svn: 100536
* Make code-completion for Objective-C message sends to "id" work in theDouglas Gregor2010-04-066-4/+88
| | | | | | | | presence of precompiled headers by forcibly loading all of the methods we know about from the PCH file before constructing our code-completion list. llvm-svn: 100535
* fit in 80 colsChris Lattner2010-04-061-2/+3
| | | | llvm-svn: 100534
* Put type restriction on convesion to nonconforming 'id' back in Fariborz Jahanian2010-04-062-3/+12
| | | | | | block pointer type comparison. llvm-svn: 100533
* Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic forDaniel Dunbar2010-04-063-5/+10
| | | | | | | | deciding when we need to emit an extra "command failed" diagnostic. - This also fixes the case where we were emitting that extra diagnostics, even when using clang w/ the integrated assembler, which has good diagnostics. llvm-svn: 100529
* Implement support for code completion of an Objective-C message send toDouglas Gregor2010-04-062-9/+88
| | | | | | | | | | "id" or an expression of type "id". In these cases, we produce a list of all of the (class or instance) methods, respectively, that we know about. Note that this implementation does not yet work well with precompiled headers; that's coming soon. llvm-svn: 100528
* Add test for code completion of Objective-C message sends to classes.Douglas Gregor2010-04-061-0/+39
| | | | llvm-svn: 100527
* Perform code-completion within ParseCastExpression, which handles,Douglas Gregor2010-04-062-1/+21
| | | | | | e.g., the right-hand side of binary expressions. llvm-svn: 100526
* clang-wpa fixes for DiagnosticDouglas Gregor2010-04-061-4/+2
| | | | llvm-svn: 100518
* Fix PR 6725. It looks like the copy constructor gets elided during inlining.Zhongxing Xu2010-04-061-1/+1
| | | | | | This bug only shows up with GCC 4.4.1 Release-Asserts build. llvm-svn: 100516
* Unbreak buildDouglas Gregor2010-04-061-2/+3
| | | | llvm-svn: 100514
* IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.Daniel Dunbar2010-04-065-23/+22
| | | | llvm-svn: 100513
* Simplify.Daniel Dunbar2010-04-061-28/+11
| | | | llvm-svn: 100512
* Simplify.Daniel Dunbar2010-04-061-6/+2
| | | | llvm-svn: 100511
* Make Diagnostic reference-counted, which is simpler than jugglingDouglas Gregor2010-04-059-63/+41
| | | | | | maybe-ownership vs. ownership. llvm-svn: 100498
* Use cast<> + OpaquePtr.getAs<Decl> to add extra checking of our assumptions.Ted Kremenek2010-04-051-2/+3
| | | | llvm-svn: 100496
OpenPOWER on IntegriCloud