summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Improve diagnostics like "initializing <type> from an expression ofDouglas Gregor2010-04-0919-45/+45
| | | | | | | type..." with "initializing <type> with an expression of type...", which reads better. Thanks to John for the improved wording. llvm-svn: 100873
* Remove all "used" static functions *after* we have performed all ofDouglas Gregor2010-04-092-8/+15
| | | | | | | | | the implicit template instantiations we need to perform. Otherwise, we end up erroneously diagnosing static functions as used if they were only used within an implicit template instantiation. Fixes a bunch of spurious failures when building Clang with Clang. llvm-svn: 100872
* Instantiate default argument expressions even if their associated parameterJohn McCall2010-04-094-3/+74
| | | | | | type isn't dependent. Fixes rdar://problem/7838962. llvm-svn: 100871
* Don't warn about unused static functions if they are marked with Chris Lattner2010-04-092-1/+8
| | | | | | attr constructor or destructor. Patch by Jean-Daniel Dupas! llvm-svn: 100870
* On Windows, disable the modification-time check for files used inDouglas Gregor2010-04-092-7/+19
| | | | | | | | precompiled headers and/or when reading the contents of the file into memory. These checks seem to be causing spurious regression-test failures on Windows. llvm-svn: 100866
* Fixes a regression caused by implementing cstyle methods Fariborz Jahanian2010-04-095-6/+10
| | | | | | for objc. llvm-svn: 100865
* Forcibly disable test/PCH/pr4489.c, it is flaky on one of the buildbots.Daniel Dunbar2010-04-091-0/+7
| | | | llvm-svn: 100864
* Add a note to the C++ compatibility page about templates with noJohn McCall2010-04-091-0/+48
| | | | | | valid instantiations. llvm-svn: 100836
* Improve diagnostics when we fail to convert from a source type to aDouglas Gregor2010-04-0970-198/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | destination type for initialization, assignment, parameter-passing, etc. The main issue fixed here is that we used rather confusing wording for diagnostics such as t.c:2:9: warning: initializing 'char const [2]' discards qualifiers, expected 'char *' [-pedantic] char *name = __func__; ^ ~~~~~~~~ We're not initializing a 'char const [2]', we're initializing a 'char *' with an expression of type 'char const [2]'. Similar problems existed for other diagnostics in this area, so I've normalized them all with more precise descriptive text to say what we're initializing/converting/assigning/etc. from and to. The warning for the code above is now: t.c:2:9: warning: initializing 'char *' from an expression of type 'char const [2]' discards qualifiers [-pedantic] char *name = __func__; ^ ~~~~~~~~ Fixes <rdar://problem/7447179>. llvm-svn: 100832
* Use '%clang_cc1' instead of '%clang' to make the warning output more ↵Ted Kremenek2010-04-081-2/+2
| | | | | | | | consistent across platforms (for this test). llvm-svn: 100827
* For 'open' check in UnixAPIChecker, hard code value of 'O_CREAT' on Darwin.Ted Kremenek2010-04-082-18/+36
| | | | | | | This is still not an ideal solution, but should disable the check for other targets where the value of O_CREAT is different. llvm-svn: 100818
* Reorder diagnostics to separate the Sema::AssignmentAction diagnostics from ↵Douglas Gregor2010-04-081-9/+10
| | | | | | other diagnostics llvm-svn: 100817
* Temporarily only enable 'open' check on Mac OS X to unbreak Windows ↵Ted Kremenek2010-04-081-0/+7
| | | | | | | | buildbot. I'm looking into an alternate fix right now. llvm-svn: 100816
* Downgrade the "declaration does not declare anything" error to aDouglas Gregor2010-04-0811-23/+22
| | | | | | | warning. It's not harmful to have such pointless declarations, and GCC does not diagnose this issue consistently. llvm-svn: 100814
* Implement method type encoding in the presenseFariborz Jahanian2010-04-087-7/+39
| | | | | | of c-style arguments. Completes radar 7445205. llvm-svn: 100813
* Match GCC's behavior and do not include '-Wunused-parameter' in '-Wunused'.Ted Kremenek2010-04-083-5/+15
| | | | llvm-svn: 100810
* Explain that a template needs arguments to make it into a type, forJeffrey Yasskin2010-04-082-1/+20
| | | | | | variable declarations. llvm-svn: 100809
* Set access properly on instantiated friend class template declarations.John McCall2010-04-082-2/+20
| | | | | | Fixes PR6752. llvm-svn: 100806
* Add static analyzer check for calls to 'pthread_once()' where the ↵Ted Kremenek2010-04-082-2/+80
| | | | | | | | control-flow has automatic storage. This matches the corresponding check for 'dispatch_once()'. llvm-svn: 100803
* Update test case.Ted Kremenek2010-04-081-1/+1
| | | | llvm-svn: 100801
* Remove micro-optimization for not issueing CFG-based warnings for 'static ↵Ted Kremenek2010-04-082-62/+3
| | | | | | | | | | inline' functions unless they are used. I discussed this with Daniel Dunbar, and we agreed that this provides an inconsistent warnings experience for the user and that there were genuine cases where we wouldn't want to do this optimization. llvm-svn: 100800
* Introduce an egregious hack to work around a bug in libstdc++ 4.2.x'sDouglas Gregor2010-04-083-4/+68
| | | | | | | | | <tr1/hashtable> header, where a friend class template std::tr1::__detail::_Map_base is declared with the wrong template parameters. GCC doesn't catch the problem, so Clang does a little back-flip to avoid diagnosing just this one instance of the problem. llvm-svn: 100790
* Fix a misuse of iterators when iterating through block'sFariborz Jahanian2010-04-081-2/+2
| | | | | | parameters list for encoding. llvm-svn: 100788
* Include all warnings under '-Wunused' in '-Wmost' and '-Wall'.Ted Kremenek2010-04-083-2/+5
| | | | llvm-svn: 100786
* Sort entries in diagnostic group "Most".Ted Kremenek2010-04-081-3/+3
| | | | llvm-svn: 100785
* Maybe we should store template arguments in the position we allocated for themJohn McCall2010-04-081-1/+1
| | | | | | | | instead of scribbling over random memory. Maybe. Hopefully this fixes the -vg buildbot. llvm-svn: 100784
* Make CXXScopeSpec invalid when incomplete, and propagate that into anyJeffrey Yasskin2010-04-0820-133/+127
| | | | | | | Declarator that depends on it. This fixes several redundant errors and bad recoveries. llvm-svn: 100779
* Rename CGVtable files to CGVTables.Anders Carlsson2010-04-086-11/+11
| | | | llvm-svn: 100778
* Clarify an assert.Anders Carlsson2010-04-081-0/+3
| | | | llvm-svn: 100776
* Unbreak the buildDouglas Gregor2010-04-081-1/+2
| | | | llvm-svn: 100775
* CIndex: move extractUSRSuffix out of extern "C" and simplify it.Benjamin Kramer2010-04-081-6/+4
| | | | llvm-svn: 100773
* Eliminate excessive PCH deserialization caused by the search forDouglas Gregor2010-04-084-37/+15
| | | | | | | | | | | | | | | | | | | | | | __cxxabiv1::__fundamental_type_info in every translation unit. Previously, we would perform name lookup for __cxxabiv1::__fundamental_type_info at the end of IRGen for a each translation unit, to determine whether it was present. If so, we we produce type information for all of the fundamental types. However, this name lookup causes PCH deserialization of a significant part of the translation unit, which has a woeful impact on performance. With this change, we now look at each record type after we've generated its vtable to see if it is __cxxabiv1::__fundamental_type_info. If so, we generate type info for all of the fundamental types. This works because __cxxabiv1::__fundamental_type_info should always have a key function (typically the virtual destructor), that will be defined once in the support library. The fundamental type information will end up there. Fixes <rdar://problem/7840011>. llvm-svn: 100772
* Remove caseless switch.Benjamin Kramer2010-04-081-7/+3
| | | | llvm-svn: 100770
* Implement dependent friend function template specializations.John McCall2010-04-0810-45/+264
| | | | llvm-svn: 100753
* Removed unused object.Ted Kremenek2010-04-081-1/+0
| | | | llvm-svn: 100750
* Fronted: Kill overly specialized RecordLayoutDumper, just make ↵Daniel Dunbar2010-04-0810-56/+31
| | | | | | -dump-record-layouts a bit that Sema honors. llvm-svn: 100747
* AST: Move C++ record layout dumping to ASTContext::DumpRecordLayout.Daniel Dunbar2010-04-083-212/+208
| | | | llvm-svn: 100746
* IRgen: Move the bit-field access type into CGBitFieldInfo, and change ↵Daniel Dunbar2010-04-085-27/+39
| | | | | | bit-field LValues to just store the base address of object containing the bit-field. llvm-svn: 100745
* Patch to implement gcc's cstyle arguments in objcFariborz Jahanian2010-04-086-9/+65
| | | | | | methods. wip. llvm-svn: 100734
* refactor out a function.Chris Lattner2010-04-081-24/+29
| | | | llvm-svn: 100733
* Fix a (bogus) uninitialized-member-of-local warning.John McCall2010-04-081-1/+1
| | | | llvm-svn: 100732
* Use SmallVector instead of an std::queue.Ted Kremenek2010-04-081-2/+1
| | | | llvm-svn: 100730
* When a template (without arguments) is passed as a template typeJeffrey Yasskin2010-04-086-6/+53
| | | | | | | parameter, explicitly ask the user to give it arguments. We used to complain that it wasn't a type and expect the user to figure it out. llvm-svn: 100729
* Fix some redundant errors by changing CXXScopeSpec::isSet calls intoJeffrey Yasskin2010-04-076-9/+12
| | | | | | isNotEmpty calls. llvm-svn: 100722
* update for api change.Chris Lattner2010-04-071-1/+1
| | | | llvm-svn: 100718
* Implement checking for template literal operator functions. ThisAlexis Hunt2010-04-071-4/+21
| | | | | | | code won't actually get used yet because we don't handle non-type parameter packs, but when we do, this code should jump in and work. llvm-svn: 100716
* Add support for stpncpy_chk.Eric Christopher2010-04-071-0/+1
| | | | llvm-svn: 100711
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-0711-18/+18
| | | | llvm-svn: 100708
* Updated comment to reflect changes made in the most recent draft.Alexis Hunt2010-04-071-5/+3
| | | | llvm-svn: 100707
* Fixed 80-cols violationAlexis Hunt2010-04-071-1/+1
| | | | llvm-svn: 100704
OpenPOWER on IntegriCloud