Commit Graph

39460 Commits

Author SHA1 Message Date
Chad Rosier 1426a81a74 [ms-inline asm] Use the new Inline Asm Non-Standard Dialect attribute.
llvm-svn: 161642
2012-08-10 00:00:34 +00:00
Jordan Rose 637ff0cc0f [analyzer] Merge RegionStore's KillStruct and CopyLazyBindings: BindAggregate.
Both methods need to clear out existing bindings and provide a new default
binding. Originally KillStruct always provided UnknownVal as the default,
but it's allowed symbolic values for quite some time (for handling returned
structs in C).

No functionality change.

llvm-svn: 161637
2012-08-09 22:55:54 +00:00
Jordan Rose a44a55a8f2 [analyzer] Cluster bindings in RegionStore by base region.
This should speed up activities that need to access bindings by cluster,
such as invalidation and dead-bindings cleaning. In some cases all we save
is the cost of building the region cluster map, but other times we can
actually avoid traversing the rest of the store.

In casual testing, this produced a speedup of nearly 10% analyzing SQLite,
with /less/ memory used.

llvm-svn: 161636
2012-08-09 22:55:51 +00:00
Jordan Rose c91e01bc11 [analyzer] Cache the "concrete offset base" for regions with symbolic offsets.
This makes it faster to access and invalidate bindings with symbolic offsets
by only computing this information once.

No intended functionality change.

llvm-svn: 161635
2012-08-09 22:55:37 +00:00
Jordan Rose b7596f6015 [analyzer] Devirtualize StoreManager::evalDerivedToBase(SVal, CastExpr)
This was triggering -Woverloaded-virtual, but there's really no reason for
the cast version to be virtual anyway. It just calls through to the QualType
entry point.

llvm-svn: 161631
2012-08-09 22:48:16 +00:00
Eli Friedman 5bb2ba0503 Followup to r161546, to unbreak linking on Bitrig. Patch by David Hill.
llvm-svn: 161630
2012-08-09 22:42:04 +00:00
Benjamin Kramer be1bc3c824 CMake: Add the new dependency from libSema to LLVM's libs.
Should fix the failures seen on some linux builders.

llvm-svn: 161629
2012-08-09 22:33:50 +00:00
Chad Rosier d82f647dee [ms-inline asm] Fix comment.
llvm-svn: 161622
2012-08-09 21:28:05 +00:00
Jordan Rose 996d309fb7 [analyzer] A CXXBaseObjectRegion should correspond to a DIRECT base.
An ASTContext's RecordLayoutInfo can only be used to look up offsets of
direct base classes, and we need the offset to make non-symbolic bindings
in RegionStore. This change makes sure that we have one layer of
CXXBaseObjectRegion for each base we are casting through.

This was causing crashes on an internal buildbot.

llvm-svn: 161621
2012-08-09 21:24:02 +00:00
Fariborz Jahanian 656b5a0937 objective-C: refactoring of objc's delayed parsing.
llvm-svn: 161620
2012-08-09 21:12:39 +00:00
Chad Rosier 8640a2a0db [ms-inline asm] Use StringRef here, per Jordan's suggestion.
llvm-svn: 161619
2012-08-09 21:06:32 +00:00
Chandler Carruth 6f71e24859 Temporarily revert r161612 while we figure out just what the semantics
of PARALLEL_DIRS are. They apparantly aren't what either Nick, Eric, or
I thought. ;] Should let the bots make forward progress.

llvm-svn: 161618
2012-08-09 21:02:52 +00:00
Anna Zaks a0105b2320 [analyzer] Rename the function to better reflect what it actually does.
llvm-svn: 161617
2012-08-09 21:02:45 +00:00
Anna Zaks 8d1f1f3b06 [analyzer] Clarify the values in Dyn. Dispatch Bifurcation map.
llvm-svn: 161616
2012-08-09 21:02:41 +00:00
Chad Rosier 543cb3e93a [ms-inline asm] Simplify logic for empty asm statements.
llvm-svn: 161615
2012-08-09 20:52:43 +00:00
Chad Rosier 11ede938e9 [ms-inline asm] Instantiate the various parts to the AsmParser.
llvm-svn: 161614
2012-08-09 20:47:38 +00:00
Chandler Carruth 69335414c1 Make all of the tools build in parallel. Missing this caused incremental
rebuilds to serially link each tool, which is really really slow.

We still have to build libclang serially first because c-index-test
depends on it.

llvm-svn: 161612
2012-08-09 20:40:24 +00:00
Chandler Carruth 60a232c82d Recurse into the extra tools repo the correct way from the Makefile
build system. Thanks to Nick for pointing at the actual construct which
should be used here.

llvm-svn: 161609
2012-08-09 20:21:38 +00:00
Richard Smith 10c6072d61 In 'delete []', the '[]' never starts a lambda. Update a FIXME with a standard reference and add a test.
llvm-svn: 161604
2012-08-09 19:01:51 +00:00
Anna Zaks 85383182ec [analyzer] Improve readability of the dyn. dispatch bifurcation patch
r161552.

As per Jordan's feedback.

llvm-svn: 161603
2012-08-09 18:43:00 +00:00
Dmitri Gribenko bacbc08b98 Remove absolute file path in test.
llvm-svn: 161602
2012-08-09 18:35:49 +00:00
Dmitri Gribenko ba7aca3b38 Comment to HTML and XML conversion: ignore commands that contain a declaration
as their argument.  For example, \fn, \function, \typedef, \method, \class etc.

llvm-svn: 161601
2012-08-09 18:20:29 +00:00
Simon Atanasyan 38c63ed5f8 Fix the test case. Now it does not depend on the method used to pass vector arguments to the function.
Reviewed by Anton Lokhmotov.

llvm-svn: 161597
2012-08-09 17:49:22 +00:00
Dmitri Gribenko dcbc8ce2b5 Comment to HTML and XML conversion: use CommandTraits to classify commands.
This also fixes a bug in comment to XML conversion: \result was just an
ordinary paragraph, not an alias for \returns.

llvm-svn: 161596
2012-08-09 17:33:20 +00:00
Chad Rosier d5c43a5f4b [ms-inline asm] Initialize targets and assembly printers/parsers.
llvm-svn: 161595
2012-08-09 17:33:11 +00:00
Chad Rosier bf40d6b6a5 [ms-inline asm] Add various MC components to clang build to support MS-style inline assembly.
llvm-svn: 161594
2012-08-09 17:17:01 +00:00
Fariborz Jahanian db5743d1b4 objective-C: minor refactoring in method
definition parsing logic.

llvm-svn: 161593
2012-08-09 17:15:00 +00:00
Anna Zaks bc6d0ccf92 Unbreak the build.
Declaring "const Decl *Decl" is not a good idea.

llvm-svn: 161567
2012-08-09 02:57:02 +00:00
Anna Zaks 23a6201890 [analyzer] Cleanup of malloc checker.
Remove Escaped state, which is not really necessary. We can just stop
tracking the symbol instead of keeping it around and marking escaped.

llvm-svn: 161557
2012-08-09 00:42:24 +00:00
Eli Friedman e66abdafa6 Fix AAPCS ABI. I can't actually test this, but it restores the behavior from before r159168. PR13562.
llvm-svn: 161554
2012-08-09 00:31:40 +00:00
Anna Zaks 123af098b8 [analyzer] Bifurcate the path with dynamic dispatch.
This is an initial (unoptimized) version. We split the path when
inlining ObjC instance methods. On one branch we always assume that the
type information for the given memory region is precise. On the other we
assume that we don't have the exact type info. It is important to check
since the class could be subclassed and the method can be overridden. If
we always inline we can loose coverage.

Had to refactor some of the call eval functions.

llvm-svn: 161552
2012-08-09 00:21:33 +00:00
Dmitri Gribenko a7b3214c4e Add new file CommentCommandTraits.cpp to CMakeLists.txt.
llvm-svn: 161551
2012-08-09 00:16:26 +00:00
Chandler Carruth ac83232974 Allow the Makefile build system to find the extra repo if it is checked
out.

Unfortunately, the existing makefiles for the extra repo don't specify
the correct library dependencies. Fixing that next. If you're following
along, you'll get linker errors.

llvm-svn: 161549
2012-08-09 00:05:27 +00:00
Dmitri Gribenko ca7f80ada0 Comment parsing: extract TableGen'able pieces into new CommandTraits class.
llvm-svn: 161548
2012-08-09 00:03:17 +00:00
Eli Friedman 9fa2885522 clang support for Bitrig (an OpenBSD fork); patch by David Hill.
llvm-svn: 161546
2012-08-08 23:57:20 +00:00
Eli Friedman 934dbbfa11 Minor simplification for r161534.
llvm-svn: 161544
2012-08-08 23:53:27 +00:00
Fariborz Jahanian 18d0a5d509 objective-C: refactor/simplify parsing of delayed
method/c-funcs defined in objc class implementation.
No intended functionality change.

llvm-svn: 161540
2012-08-08 23:41:08 +00:00
Eli Friedman ba01f2bc04 Fix r161534 so it actually builds.
llvm-svn: 161539
2012-08-08 23:35:12 +00:00
Richard Smith ac4e36d1af PR13558: Fix typo 'compatiblity'. Thinking of the children. Apparently.
llvm-svn: 161537
2012-08-08 23:32:13 +00:00
Eli Friedman 89b1f2c7e1 Handle deprecation diagnostics correctly for C struct fields and Objective-C properties/ivars. <rdar://problem/6642337>.
llvm-svn: 161534
2012-08-08 23:04:35 +00:00
Dmitri Gribenko 6cffc1928a Comment XML: use xml:space="preserve" in Verbatim tags, so that XML tidy does
not compress spaces in verbatim content.

llvm-svn: 161531
2012-08-08 22:10:24 +00:00
Eli Friedman 971bfa11c6 Unify the codepaths for emitting deprecation warnings. The test changes are just to account for us emitting notes more consistently.
llvm-svn: 161528
2012-08-08 21:52:41 +00:00
Anna Zaks 13b0857ad0 Address code review comments for Wstrncat-size warning (r161440).
llvm-svn: 161527
2012-08-08 21:42:23 +00:00
Chad Rosier 5d4d8b746b [ms-inline asm] Use more idiomatic logic. Thanks, Bill.
llvm-svn: 161526
2012-08-08 21:42:11 +00:00
Jordan Rose 742c6079e2 Implicitly annotate __CFStringMakeConstantString with format_arg(1).
We handled the builtin version of this function in r157968, but the builtin
isn't used when compiling as -fno-constant-cfstrings.

This should complete <rdar://problem/6157200>.

llvm-svn: 161525
2012-08-08 21:17:31 +00:00
Chad Rosier 360e1763d5 [ms-inline asm] Add basic codegen support for simple asm stmts. Currently,
only machine specific clobbers are modeled.

llvm-svn: 161524
2012-08-08 21:15:52 +00:00
Eli Friedman 0415f3e138 Don't add attributes for "#pragma pack" and friends to tag declarations which
are not definitions. This follows the behavior of both gcc and earlier
versions of clang. Regression from r156531.  <rdar://problem/12048621>.

llvm-svn: 161523
2012-08-08 21:08:34 +00:00
Chad Rosier b1886eb604 [ms-inline asm] Make sure IsSimple is correctly handled.
llvm-svn: 161522
2012-08-08 21:08:20 +00:00
Chad Rosier 66753b3835 Remove extraneous comment.
llvm-svn: 161521
2012-08-08 20:38:22 +00:00
Chad Rosier 83916498b8 [ms-inline asm] Add a very simple test case. Basically, we're only testing for
crashers at the moment (and coincidentally this case was causing a crash).

llvm-svn: 161520
2012-08-08 20:37:31 +00:00