Commit Graph

101748 Commits

Author SHA1 Message Date
Douglas Gregor 9720642c68 Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.

llvm-svn: 126737
2011-03-01 03:11:17 +00:00
Johnny Chen 37f99fdb73 Add TestProcessAPI.py which exercises some Python SBProcess API. In particular, this tests
the SBProcess.ReadMemory() API, which, due to SWIG typemap'ing, expects 3 arguments (the location
to read from, the size in bytes to read, and an SBError object), and returns the result as a
Python string object.

On SnowLeopard where this has been tested, the SWIG script needs to be pampered (use the exact
same parameter names as in SBProcess.h) in order for this to work.

llvm-svn: 126736
2011-03-01 02:20:14 +00:00
Argyrios Kyrtzidis a9a0f5d206 [analyzer] Also make sure that the parameter is coming from the current stack frame.
llvm-svn: 126735
2011-03-01 01:59:41 +00:00
Argyrios Kyrtzidis 456b18c279 [analyzer] Remove SVal::getAsVarDecl() and reason about MemRegions, not Decls. Suggestion by Ted!
llvm-svn: 126734
2011-03-01 01:47:48 +00:00
Jim Grosbach 621818ab1a trailing whitespace.
llvm-svn: 126733
2011-03-01 01:39:05 +00:00
Jim Ingham 6b90ba414a Look for swig in /usr/bin and /usr/local/bin.
llvm-svn: 126732
2011-03-01 01:39:04 +00:00
Jim Grosbach 1d479dbc55 Generalize the register matching code in DAGISel a bit.
llvm-svn: 126731
2011-03-01 01:37:19 +00:00
Ken Dyck dbe37f38d0 Use CharUnits for TypeAlign variable in LayoutWideBitField(). No change in
functionality intended.

llvm-svn: 126730
2011-03-01 01:36:00 +00:00
Douglas Gregor 3d0da5f5dd Push nested-name-specifier source location information into
DependentNameTypeLoc. Teach the recursive AST visitor and libclang how to
walk DependentNameTypeLoc nodes.

Also, teach libclang about TypedefDecl source ranges, so that we get
those. The massive churn in test/Index/recursive-cxx-member-calls.cpp
is a good thing: we're annotating a lot more of this test correctly
now.

llvm-svn: 126729
2011-03-01 01:34:45 +00:00
Argyrios Kyrtzidis 918c847890 [analyzer] Move lib/StaticAnalyzer/Checkers/ExprEngine.cpp -> lib/StaticAnalyzer/Core
and hope the wrath of the buildbots will not descend upon me.

llvm-svn: 126728
2011-03-01 01:24:23 +00:00
Ken Dyck aab635e67a Change the return type of GetVirtualPointersSize() to CharUnits. No change
in functionality intended.

llvm-svn: 126727
2011-03-01 01:22:45 +00:00
Argyrios Kyrtzidis 6a5674ffa6 [analyzer] Rename CheckerV2 -> Checker.
llvm-svn: 126726
2011-03-01 01:16:21 +00:00
Argyrios Kyrtzidis 0036b19abd [analyzer] Remove Checker V1.
llvm-svn: 126725
2011-03-01 01:16:08 +00:00
Argyrios Kyrtzidis d665807901 [analyzer] Remove checker V1 registration and running from ExprEngine.
llvm-svn: 126724
2011-03-01 01:16:03 +00:00
Bill Wendling 3b1459b810 Narrow right shifts need to encode their immediates differently from a normal
shift.

   16-bit: imm6<5:3> = '001', 8 - <imm> is encded in imm6<2:0>
   32-bit: imm6<5:4> = '01',16 - <imm> is encded in imm6<3:0>
   64-bit: imm6<5> = '1', 32 - <imm> is encded in imm6<4:0>

llvm-svn: 126723
2011-03-01 01:00:59 +00:00
Zhanyong Wan 5ad574c096 Improves the coding style in SValBuilder. This patch:
- renames evalCastNL and evalCastL to evalCastFromNonLoc and
  evalCastFromLoc (avoid abbreviations that aren't well known).

- makes all function parameter names start with a lower case letter
  for consistency and distinction from member variables.

- avoids abbreviations in function parameter names.

Reviewed by kremenek@apple.com.

llvm-svn: 126722
2011-03-01 00:45:32 +00:00
Douglas Gregor ff42ec5895 Fix some regressions in the GCC testsuite due to bad souce-location
information. Fixes <rdar://problem/9063643>.

llvm-svn: 126721
2011-03-01 00:34:57 +00:00
Eli Friedman 683bbc16c4 Add an obvious missing safety check to DAE::RemoveDeadArgumentsFromCallers.
llvm-svn: 126720
2011-03-01 00:33:47 +00:00
Chris Lattner 0c6cb46ac1 add a note
llvm-svn: 126719
2011-03-01 00:24:51 +00:00
Chris Lattner 2e72da947c -fwrapv should turn off the inbounds markers from geps used for pointer
arithmetic.  This is part of PR9256, it would be great if someone else
wired up -fno-strict-overflow in the driver to -fwrapv.

llvm-svn: 126718
2011-03-01 00:03:48 +00:00
Ted Kremenek 49d15b959e Unbreak CMake build.
llvm-svn: 126717
2011-03-01 00:02:51 +00:00
Douglas Gregor 9b27251e58 Refactor the construction of nested-name-specifiers with
source-location information into a NestedNameSpecifierLocBuilder
class, which lives within the AST library and centralize all knowledge
of the format of nested-name-specifier location information here.

No functionality change.

llvm-svn: 126716
2011-02-28 23:58:31 +00:00
Ted Kremenek 20164dcc68 Unbreak CMake build.
llvm-svn: 126715
2011-02-28 23:56:33 +00:00
Talin 3a0a30d44d Add an END_WITH_NULL accessor for ConstantStruct.
llvm-svn: 126714
2011-02-28 23:53:27 +00:00
Rafael Espindola 22f60303f2 Don't warn about "clang -use-gold-plugin -c ...". With this users can say
CC="clang -use-gold-plugin" CFLAGS=-emit-llvm ../configure...
and not be hit with a warning for each .c file.

llvm-svn: 126713
2011-02-28 23:29:45 +00:00
Caroline Tice 6261d240e1 Add code to emulate LDRH (literal) Arm instruction.
llvm-svn: 126709
2011-02-28 23:15:24 +00:00
Stephen Wilson bbb7e06ad3 Add register context for i386 on Linux.
Patch by Marco Minutoli!

llvm-svn: 126696
2011-02-28 22:52:38 +00:00
Chris Lattner 1ac5e0c5c6 update cmake
llvm-svn: 126694
2011-02-28 22:45:25 +00:00
Douglas Gregor 9cbc22ba2d Teach Sema::CheckTypenameType to use nested-name-specifiers with
source-location information. We don't actually preserve this
information in any of the resulting TypeLocs (yet), so it doesn't
matter.

llvm-svn: 126693
2011-02-28 22:42:13 +00:00
Caroline Tice adef8fb003 Add code to emulate LDRH (immediate, Thumb) arm instruction.
llvm-svn: 126692
2011-02-28 22:39:58 +00:00
Devang Patel bbe4ff99e0 Use single code path to handle c++ structs and classes while generating debug info.
llvm-svn: 126691
2011-02-28 22:32:45 +00:00
Argyrios Kyrtzidis 29b8656935 [analyzer] Remove unused checker stuff from AnalysisConsumer and some unused headers.
llvm-svn: 126690
2011-02-28 22:30:38 +00:00
Renato Golin ec0fc7d842 Fix .fpu printing in ARM assembly, regarding bug http://llvm.org/bugs/show_bug.cgi?id=8931
llvm-svn: 126689
2011-02-28 22:04:27 +00:00
Douglas Gregor ea972d3faa Push nested-name-specifier location information into DeclRefExpr and
MemberExpr, the last of the expressions with qualifiers!

llvm-svn: 126688
2011-02-28 21:54:11 +00:00
Kevin Enderby 63b0d108a2 Add missing whitespace in the formatting.
llvm-svn: 126687
2011-02-28 21:45:12 +00:00
Jan Sjödin 30a52dec93 Make all static functions become static class methods. Move shared (duplicated) functions to new MCELF class.
llvm-svn: 126686
2011-02-28 21:45:04 +00:00
Fariborz Jahanian 557c1ed522 Revert r126678.
llvm-svn: 126685
2011-02-28 21:19:34 +00:00
Owen Anderson 0dc63104c6 Use the correct shift amount type.
llvm-svn: 126684
2011-02-28 21:10:10 +00:00
Owen Anderson 4f4df81861 Clean whitespace.
llvm-svn: 126683
2011-02-28 20:57:56 +00:00
Chris Lattner c93d207e8c fix a signed comparison warning.
llvm-svn: 126682
2011-02-28 20:50:35 +00:00
Douglas Gregor 0da1d43e16 Push nested-name-specifier source location information into
UnresolvedLookupExpr and UnresolvedMemberExpr.

Also, improve the computation that checks whether the base of a member
expression (either unresolved or dependent-scoped) is implicit. The
previous check didn't cover all of the cases we use in our
representation, which threw off source-location information for these
expressions (which, in turn, caused some breakage in libclang's token
annotation). 

llvm-svn: 126681
2011-02-28 20:01:57 +00:00
Dan Gohman 6564ca0c23 Delete obsolete test.
llvm-svn: 126680
2011-02-28 19:58:14 +00:00
Owen Anderson 1401dbd211 Fix warning when building with clang++.
llvm-svn: 126679
2011-02-28 19:58:06 +00:00
Fariborz Jahanian 79246322a6 objc IRGen for Next runtime message API.
The prototype for objc_msgSend() is technically variadic - 
`id objc_msgSend(id, SEL, ...)`. 
But all method calls should use a prototype that matches the method, 
not the prototype for objc_msgSend itself().
// rdar://9048030

llvm-svn: 126678
2011-02-28 19:55:59 +00:00
Argyrios Kyrtzidis 9eb02dfa89 [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.
llvm-svn: 126676
2011-02-28 19:49:42 +00:00
Argyrios Kyrtzidis af181bb19b Move test/SemaObjC/method-arg-decay.m -> test/Analysis/method-arg-decay.m
llvm-svn: 126675
2011-02-28 19:49:21 +00:00
Argyrios Kyrtzidis 6a1c760760 [analyzer] Run the ExprEngine depending on the CheckerManager having path-sensitive checkers.
llvm-svn: 126674
2011-02-28 19:49:17 +00:00
Argyrios Kyrtzidis 20f5caa518 [analyzer] The current UninitializedValuesChecker will go away, remove '-warn-uninit-values'.
llvm-svn: 126673
2011-02-28 19:49:12 +00:00
Dan Gohman 06d70015ce Delete the GEPSplitter experiment.
llvm-svn: 126671
2011-02-28 19:47:47 +00:00
Peter Collingbourne 938f7d0e46 Kill 18 month old #if 0'd code in StmtXML.cpp
llvm-svn: 126670
2011-02-28 19:42:30 +00:00