aboutsummaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2013-05-05ArrayRef<T>() -> None cleanupDmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181140 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Restore Richard's belief in me.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181042 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02Use attribute argument information to determine when to parse attribute ↵Douglas Gregor
arguments as expressions. This change partly addresses a heinous problem we have with the parsing of attribute arguments that are a lone identifier. Previously, we would end up parsing the 'align' attribute of this as an expression "(Align)": template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align((Align)))) char storage[Size]; }; while this would parse as a "parameter name" 'Align': template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align(Align))) char storage[Size]; }; The code that handles the alignment attribute would completely ignore the parameter name, so the while the first of these would do what's expected, the second would silently be equivalent to template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align)) char storage[Size]; }; i.e., use the maximal alignment rather than the specified alignment. Address this by sniffing the "Args" provided in the TableGen description of attributes. If the first argument is "obviously" something that should be treated as an expression (rather than an identifier to be matched later), parse it as an expression. Fixes <rdar://problem/13700933>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180973 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02Revert r180970; it's causing breakage.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180972 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02Use attribute argument information to determine when to parse attribute ↵Douglas Gregor
arguments as expressions. This change partly addresses a heinous problem we have with the parsing of attribute arguments that are a lone identifier. Previously, we would end up parsing the 'align' attribute of this as an expression "(Align)": template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align((Align)))) char storage[Size]; }; while this would parse as a "parameter name" 'Align': template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align(Align))) char storage[Size]; }; The code that handles the alignment attribute would completely ignore the parameter name, so the while the first of these would do what's expected, the second would silently be equivalent to template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align)) char storage[Size]; }; i.e., use the maximal alignment rather than the specified alignment. Address this by sniffing the "Args" provided in the TableGen description of attributes. If the first argument is "obviously" something that should be treated as an expression (rather than an identifier to be matched later), parse it as an expression. Fixes <rdar://problem/13700933>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180970 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-25[neonemitter tests] Change triple of emitted tests to thumbv7s to match the ↵Michael Gottesman
target cpu being swift. Also specify the target-abi to apcs-gnu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180233 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16[6/6] ARM Neon Intrinsic Tablegen Test Generator.Michael Gottesman
Added GenerateChecksForIntrinsic method to generate FileCheck patterns for generated arm neon tests. Reviewed by Bob Wilson. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179644 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16[5/6] ARM Neon Intrinsic Tablegen Test Generator.Michael Gottesman
Changed the test generation target cpu type from cortex-a9 to swift. Reviewed by Bob Wilson. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179642 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16[4/6] ARM Neon Intrinsic Tablegen Test Generator.Michael Gottesman
Added code to NeonEmitter::runTests so that GenTest gets all of the needed arguments to invoke the neon test generation methods. Reviewed by Bob Wilson. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179640 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16[3/6] ARM Neon Intrinsic Tablegen Test Generator.Michael Gottesman
Refactored out the method InstructionTypeCode from MangleName for use in further patches which perform neon tablegen test generation. Reviewed by Bob Wilson. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16[2/6] ARM Neon Intrinsic Tablegen Test Generator.Michael Gottesman
This patch causes OpInst records to be silently identified with their Non-Op inst counterparts so that the same test generation infrastructure can be used to generate tests. Reviewed by Bob Wilson. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179628 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Define Neon intrinsics as "static inline" to avoid warning. rdar://13108414Bob Wilson
We had been defining Neon intrinsics as "static" with always_inline attributes. If you use them from an extern inline function, you get a warning, e.g.: static function 'vadd_u8' is used in an inline function with external linkage This change simply adds the inline keyword to avoid that warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179406 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05doce parsing: adding few more headerdoc tags.Fariborz Jahanian
// rdar://12379114 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178903 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05[analyzer] Re-enable cplusplus.NewDelete (but not NewDeleteLeaks).Jordan Rose
As mentioned in the previous commit message, the use-after-free and double-free warnings for 'delete' are worth enabling even while the leak warnings still have false positives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178891 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02[analyzer] Moving cplusplus.NewDelete to alpha.* for now.Anton Yartsev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178529 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26[ms-cxxabi] Give the MS inheritance attributes a base classReid Kleckner
Required making a handful of changes to the table generator. Also adds an unspecified inheritance attribute. This opens the path for us to apply these attributes to C++ records implicitly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178054 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25[analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, ↵Anton Yartsev
double free, and use-after-free problems of memory managed by new/delete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177849 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23[analyzer] CmpRuns.py: Accept single files as input.Jordan Rose
This allows us to compare two direct invocations of the analyzer on a single source file without having to wrap the output plists in their own directories. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177804 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08Documentation parsing. Some refactoring and codeFariborz Jahanian
improvements per Dmtiri's comments. // rdar://12379114 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176739 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07HeaderDoc: Support more of HeaderDoc documentation Fariborz Jahanian
commands; top level tags such as @interface and their 2nd level tags such as @coclass, etc. // rdar://12379114 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176667 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-05doc parsing. We want to issue a strong warning whenFariborz Jahanian
an @function comment is not followed by a function decl. // rdar://13094352 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176468 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21Strip 'llvm' from 'llvm::Optional' uses.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175701 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko
This change introduces a 'kind' attribute for the <Para> tag, that captures the kind of the parent block command. For example: \todo Meow. used to be just <Para>Meow.</Para>, but now it is <Para kind="todo">Meow.</Para> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174216 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01[Sema][Attr]Fix alignment attribute printing.Michael Han
Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should only model those appear in source code. Introduce attribute Accessor, and teach TableGen to generate syntax kind accessors for Align attribute, and use those accessors to decide if an alignment attribute is a declspec attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174133 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31[Comment parsing] Add support for recognizingFariborz Jahanian
\headerfile command and representing it in an xml document. Patch reviewed by Dmitri Gribenko. // rdar://12397511 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174109 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31Add indents to AST dumping and removed parenthesis from AST nodes.Richard Trieu
Indents were given the color blue when outputting with color. AST dumping now looks like this: Node |-Node | `-Node `-Node `-Node Compared to the previous: (Node (Node (Node)) (Node (Node))) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174022 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30TableGen backends: use emitSourceFileHeader() to emit the warning aboutDmitri Gribenko
file contents being autogenerated git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30Comment parsing: resolve more named character referencesDmitri Gribenko
This reimplements r173850 with a better approach: (1) use a TableGen-generated matcher instead of doing a linear search; (2) avoid allocations for new strings by converting code points to string iterals with TableGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173931 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29Propagate the spelling list index for an attribute across template ↵Richard Smith
instantiation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173768 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelledRichard Smith
as a keyword. Rationalize existing attributes to use it as appropriate, and to not lie about some __declspec attributes being GNU attributes. In passing, remove a gross hack which was discarding attributes which we could handle. This results in us actually respecting the __pascal keyword again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173746 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27Add the missing line return to align parameters of printPretty.Michael Han
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173597 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25[utils] Kill another no-longer-useful utility script.Daniel Dunbar
- We are long past the days of getting clang to fail in mass on swaths of code, fortunately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173523 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25[utils] Remove the OptionalTests subdir no one runs.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173491 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25[utils] Remove C++Tests that I don't think anyone uses anymore.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173490 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24scan-build: Add a --keep-empty option for better testing.Jordan Rose
SATestBuild expects to compare output directories for each invocation of scan-build that it runs, but scan-build clears out empty directories by default. We were coincidentally not getting that behavior until r173294. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173383 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24PR14922: when printing an attribute, use the real syntax of the attribute ↵Michael Han
(GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td. This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute. When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and name, then passed to Attr that will use the index to print itself. Thanks to Richard Smith for the idea and review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173358 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-20clang/utils/valgrind/x86_64-pc-linux-gnu_gcc-4.3.3.supp: Add /usr/bin/cmp.NAKAMURA Takumi
FIXME: It could be removed if; - check-all included llvm/valgrind/supp, too. - clang-vg didn't use "check-all". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172982 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14Turns out there is a simpler way of getting a set difference in bash than ↵Benjamin Kramer
parsing diff output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172420 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12Speed up find-unused-diagnostics. Now runs in less than a second instead of ↵Benjamin Kramer
more than a minute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172330 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko
brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10Error if an anonymous DiagGroup is referenced multiple times.Jordan Rose
Not only is this inefficient for TableGen, it's annoying for maintenance when renaming warning flags (unusual) or adding those flags to a group (more likely). This uses the new fix-it infrastructure for LLVM's SourceMgr/SMDiagnostic, as well as a few changes to TableGen to track more source information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172087 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09[utils/ClangDataFormat.py] Don't use lldb.frame directly, get the frame from ↵Argyrios Kyrtzidis
the value. Some lldb changes made lldb.frame not set until a script is invoked, which made the formatters not working after a restart. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172017 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07Fixed a number of -Wcovered-switch-default diagnostics in ↵Alexander Kornienko
tools/clang/include/clang/AST/AttrDump.inc git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171768 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07Implement Attr dumping for -ast-dump.Alexander Kornienko
http://llvm-reviews.chandlerc.com/D234 Patch by Philip Craig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171760 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Sort the #include lines under utils/...Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169245 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-26[analyzer] SATestBuild.py: allow make builds to disable parallelizationJordan Rose
Before, SATestBuild unilaterally added '-j<n>' to every project built with 'make'. Now, we check and see if there's a -j option already specified, which allows a project to explicitly be marked '-j1'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168603 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16[analyzer] SATestBuild.py: fix broken string concatenationJordan Rose
This has been broken for a while, but the branch was never being taken. (We were trying to do 'str + floatVal'; now we do 'str % intVal' and use the '%d' format.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168174 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16[ClangDataFormat.py] Add summary for QualType.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168117 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-15[analyzer] CmpRuns: move the clang_version info into the run (out ofAnna Zaks
report) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168105 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-15[analyzer] SATestBuild.py: correctly add -j option for projects using make.Jordan Rose
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168099 91177308-0d34-0410-b5e6-96231b3b80d8