summaryrefslogtreecommitdiffstats
path: root/clang/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* SATestBuild should not ask for non-existent checkers.Jordan Rose2012-07-261-1/+1
| | | | | | | - "cocoa" was moved to "osx.cocoa" a long time ago. - "cplusplus" would be a valid package except we don't have any C++ checkers. llvm-svn: 160821
* Un-break standalone invocations of CmpRuns.py.Jordan Rose2012-07-261-1/+1
| | | | | | Fallout from CmpRuns.py API changes in r160314. llvm-svn: 160800
* Remove an unused headerMichael Han2012-07-191-1/+0
| | | | llvm-svn: 160492
* [analyzer] Make CmpRuns external-user friendly.Anna Zaks2012-07-162-45/+63
| | | | | | | | | CmpRuns can be used for static analyzer bug report comparison. However, we want to make sure external users do not rely on the way bugs are represented (plist files). Make sure that we have a user friendly/documented API for CmpRuns script. llvm-svn: 160314
* Re-apply r159875 with fixes.Ted Kremenek2012-07-071-10/+229
| | | | | | | - Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32 - Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic. llvm-svn: 159892
* Revert rr159875, "Implement -Wpedantic and --no-pedantic to complement ↵NAKAMURA Takumi2012-07-071-228/+10
| | | | | | | | | | -Weverything." It broke several builds. I suspect FileCheck might match assertion failure, even if clang/test/Misc/warning-flags.c passed the test. > 0. Program arguments: bin/./clang -### -pedantic -Wpedantic clang/test/Driver/warning-options.cpp llvm-svn: 159886
* Implement -Wpedantic and --no-pedantic to complement -Weverything.Ted Kremenek2012-07-061-10/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces some magic in tablegen to create a "Pedantic" diagnostic group which automagically includes all warnings that are extensions. This allows a user to suppress specific warnings traditionally under -pedantic used an ordinary warning flag. This also allows users to use #pragma to silence specific -pedantic warnings, or promote them to errors, within blocks of text (just like any other warning). -Wpedantic is NOT an alias for -pedantic. Instead, it provides another way to (a) activate -pedantic warnings and (b) disable them. Where they differ is that -pedantic changes the behavior of the preprocessor slightly, whereas -Wpedantic does not (it just turns on the warnings). The magic in the tablegen diagnostic emitter has to do with computing the minimal set of diagnostic groups and diagnostics that should go into -Wpedantic, as those diagnostics that already members of groups that themselves are (transitively) members of -Wpedantic do not need to be included in the Pedantic group directly. I went back and forth on whether or not to magically generate this group, and the invariant was that we always wanted extension warnings to be included in -Wpedantic "some how", but the bookkeeping would be very onerous to manage by hand. -no-pedantic (and --no-pedantic) is included for completeness, and matches many of the same kind of flags the compiler already supports. It does what it says: cancels out -pedantic. One discrepancy is that if one specifies --no-pedantic and -Weverything or -Wpedantic the pedantic warnings are still enabled (essentially the -W flags win). We can debate the correct behavior here. Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp that determine whether to include the "-pedantic" flag in the warning output. This is no longer needed, as all extensions now have a -W flag. This patch also significantly reduces the number of warnings not under flags from 229 to 158 (all extension warnings). That's a 31% reduction. llvm-svn: 159875
* Implement AST classes for comments, a real parser for Doxygen comments and aDmitri Gribenko2012-07-061-0/+6
| | | | | | | | | | | | | | very simple semantic analysis that just builds the AST; minor changes for lexer to pick up source locations I didn't think about before. Comments AST is modelled along the ideas of HTML AST: block and inline content. * Block content is a paragraph or a command that has a paragraph as an argument or verbatim command. * Inline content is placed within some block. Inline content includes plain text, inline commands and HTML as tag soup. llvm-svn: 159790
* [analyzer] Add a statistic for maximum CFG size and a script to summarize ↵Anna Zaks2012-07-051-0/+75
| | | | | | analyzer stats from scan-build output. llvm-svn: 159776
* clang/utils/TableGen/ClangAttrEmitter.cpp: Fix abuse of StringRef (from ↵NAKAMURA Takumi2012-07-031-1/+1
| | | | | | getValueAsString()). llvm-svn: 159662
* Fix a thinko and a stray debugging hunk in my attributes patch. Thanks to JordanAlexis Hunt2012-06-201-3/+0
| | | | | | Rose and Richard Smith for catching these. llvm-svn: 158826
* Reapply r158700 and fixup patches, minus one hunk that slipped through andAlexis Hunt2012-06-191-55/+43
| | | | | | | caused a crash in an obscure case. On the plus side, it caused me to catch another bug by inspection. llvm-svn: 158767
* Revert r158700 and dependent patches r158716, r158717, and r158731.Jakob Stoklund Olesen2012-06-191-43/+55
| | | | | | | | The original r158700 caused crashes in the gcc test suite, g++.abi/vtable3a.C among others. It also caused failures in the libc++ test suite. llvm-svn: 158749
* Remove redundant uses of SmallStringAlexis Hunt2012-06-191-7/+3
| | | | llvm-svn: 158731
* Stop abusing StringRef. Fixes the Windows build.Alexis Hunt2012-06-191-12/+12
| | | | | | | I've also removed the duplicate check for PARSED_ATTR since it seems unnecessary, and would have made the code more complicated. llvm-svn: 158716
* Improve the specification of spellings in Attr.td.Alexis Hunt2012-06-191-53/+45
| | | | | | | | | | | | | | | | | Note that this is mostly a structural patch that handles the change from the old spelling style to the new one. One consequence of this is that all AT_foo_bar enum values have changed to not be based off of the first spelling, but rather off of the class name, so they are now AT_FooBar and the like (a straw poll on IRC showed support for this). Apologies for code churn. Most attributes have GNU spellings as a temporary solution until everything else is sorted out (such as a Keyword spelling, which I intend to add if someone else doesn't beat me to it). This is definitely a WIP. I've also killed BaseCheckAttr since it was unused, and I had to go through every attribute anyway. llvm-svn: 158700
* Handle C++11 attribute namespaces automatically.Alexis Hunt2012-06-181-2/+24
| | | | | | | | Now, as long as the 'Namespaces' variable is correct inside Attr.td, the generated code will correctly admit a C++11 attribute only when it has the appropriate namespace(s). llvm-svn: 158661
* Make clang-tblgen backends functions instead of TableGenBackends.Jakob Stoklund Olesen2012-06-1314-630/+403
| | | | | | | | Get rid of a bunch of header files. TableGen output should be unaffected. Patch by Sean Silva! llvm-svn: 158388
* [analyzer] Use "issue hash" in CmpRuns; followup on r158180Anna Zaks2012-06-081-3/+11
| | | | | | | (For the future: It would be more efficient to produce a hash key with the embedded function info inside the compiler.) llvm-svn: 158187
* Minor comments and changes to clang-completion-mode.el, from David Wood!Douglas Gregor2012-06-071-19/+11
| | | | llvm-svn: 158174
* [analyzer] SATestBuild should execute SVN updates even if Verbose is off.Jordan Rose2012-06-011-3/+3
| | | | | | Also, re-use glob results when looking for failure logs. llvm-svn: 157817
* [analyzer] Fix SATestAdd to work with SATestBuild.Jordan Rose2012-06-012-15/+10
| | | | | | | Also, eliminate global 'IsReferenceBuild' in SATestBuild. It doesn't get passed around that much. llvm-svn: 157816
* Updating the visualizers to include more datatypes. Patch thanks to Jay ↵Aaron Ballman2012-05-311-41/+267
| | | | | | Blanchard. llvm-svn: 157763
* TableGen: Remove extraneous '\' at EOL in generated tests.Jim Grosbach2012-05-301-1/+1
| | | | llvm-svn: 157700
* Fix typo.Ted Kremenek2012-05-221-1/+1
| | | | llvm-svn: 157229
* Use Perl prototypes instead of shift.Ted Kremenek2012-05-221-3/+3
| | | | llvm-svn: 157228
* Add basic delta-debugging script used for reducing analyzer crasher test cases.Ted Kremenek2012-05-211-0/+65
| | | | llvm-svn: 157219
* SmallString Visual Studio visualizer by Will Wilson.David Blaikie2012-05-161-0/+5
| | | | llvm-svn: 156959
* Fix our handling of visibility in explicit template instantiations.Rafael Espindola2012-05-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * Don't copy the visibility attribute during instantiations. We have to be able to distinguish struct HIDDEN foo {}; template<class T> DEFAULT void bar() {} template DEFAULT void bar<foo>(); from struct HIDDEN foo {}; template<class T> DEFAULT void bar() {} template void bar<foo>(); * If an instantiation has an attribute, it takes precedence over an attribute in the template. * With instantiation attributes handled with the above logic, we can now select the minimum visibility when looking at template arguments. llvm-svn: 156821
* Teach the parser to deal with multiple spellings for the sameDouglas Gregor2012-05-111-9/+13
| | | | | | | attribute, rather than requiring multiple cases in consumers of this information. llvm-svn: 156666
* ARM: Support marking intrinsic definitions as 'unavailable'Jim Grosbach2012-05-092-4/+10
| | | | llvm-svn: 156490
* Remove DiagGroups from notes, and add a TableGen assertion to catch them.Richard Smith2012-05-041-0/+2
| | | | llvm-svn: 156192
* Replace the StringSwitch in AttributeList::getKind() with aDouglas Gregor2012-05-021-3/+17
| | | | | | | | TableGen-generated StringMatcher, for a 1.2% speedup in -fparse-only time in <rdar://problem/11004361>. Thanks to Benjamin for pointing me at StringMatcher! llvm-svn: 156003
* Introduce the notion of 'ignored' attributes, so that all attributesDouglas Gregor2012-05-021-5/+9
| | | | | | we accept are not modeled somehow via Attr.td. llvm-svn: 155998
* Introduce the notion of an attribute that has no direct representationDouglas Gregor2012-05-021-1/+23
| | | | | | as an AST node, and fold a number of such attributes into Attr.td. llvm-svn: 155995
* Revert my optimization to AttributeList::getKind() in r155987;Douglas Gregor2012-05-021-2/+1
| | | | | | Benjamin has suggested a better approach. llvm-svn: 155989
* Replace the StringSwitch in AttributeList::getKind(constDouglas Gregor2012-05-021-1/+2
| | | | | | | IdentifierInfo *) with a static StringMap, improving -fsyntax-only performance by 1% for the example in <rdar://problem/11004361>. llvm-svn: 155987
* Add a FIXME for uncomplete commentGabor Greif2012-04-241-7/+7
| | | | | | | fix a typo add punctuation llvm-svn: 155443
* Add SmallVectorImpl Visual Studio visualizer. Patch by Nikola Smiljanic.David Blaikie2012-04-191-0/+26
| | | | llvm-svn: 155140
* Remove the vestiges of the C backend.Eric Christopher2012-03-233-6/+0
| | | | llvm-svn: 153308
* Adding namespace qualifiers to the visualizers and improving their behavior.Aaron Ballman2012-03-101-8/+8
| | | | | | Patch thanks to Nikola Smiljanic llvm-svn: 152514
* [utils/FuzzTest] Add '--stop-on-fail' to stop the script on the first failureArgyrios Kyrtzidis2012-03-081-1/+11
| | | | | | without reverting the changes. llvm-svn: 152333
* [utils/FuzzTest] The help message says that if you don't specify --max-testsArgyrios Kyrtzidis2012-03-081-1/+1
| | | | | | "the script will run forever continually picking new tests to run", make it so. llvm-svn: 152327
* [utils/FuzzTest] For --filelist the option type is string, not integer.Argyrios Kyrtzidis2012-03-081-1/+1
| | | | llvm-svn: 152324
* Spelling.Daniel Dunbar2012-03-081-1/+1
| | | | llvm-svn: 152281
* Refactor Clang sema attribute handling.Michael Han2012-03-073-0/+131
| | | | | | | | | | | | | | | | | This submission improves Clang sema handling by using Clang tablegen to generate common boilerplate code. As a start, it implements AttributeList enumerator generation and case statements for AttributeList::getKind. A new field "SemaHandler" is introduced in Attr.td and by default set to 1 as most of attributes in Attr.td have semantic checking in Sema. For a small number of attributes that don't appear in Sema, the value is set to 0. Also there are a small number of attributes that only appear in Sema but not in Attr.td. Currently these attributes are still hardcoded in Sema AttributeList. Reviewed by Delesley Hutchins. llvm-svn: 152169
* [tablegen] Make sure that the code that is determining the order of warning ↵Argyrios Kyrtzidis2012-03-061-51/+46
| | | | | | | | groups is shared to avoid any "misalignment" if indices. llvm-svn: 152074
* [analyzer] Testing: These checkers are not experimental anymore.Anna Zaks2012-02-201-1/+1
| | | | llvm-svn: 150989
* Store the warning option corresponding to a diagnostics as an index into the ↵Benjamin Kramer2012-02-151-5/+23
| | | | | | | | option table instead of storing the name. Another 8 bytes + relocation removed from every diagnostic on x86_64. llvm-svn: 150615
* [analyzer] Add the Malloc checker to the list of tested checkers.Anna Zaks2012-02-151-1/+1
| | | | llvm-svn: 150535
OpenPOWER on IntegriCloud