Граф коммитов

5756 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek e22d911dcf Added iterators for types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58050 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 23:35:43 +00:00
Daniel Dunbar c6cb77f1e5 Fix regression in comparison of qualified id; == operator was being
created with LHS and RHS whose types didn't match.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58049 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 23:30:52 +00:00
Steve Naroff d9c179d97f Add some files to VC++ project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58047 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 23:20:50 +00:00
Ted Kremenek b247578c52 Updated Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58046 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 23:15:03 +00:00
Ted Kremenek 7ab944725e For Radar reporting, null dereferences should be default classified as "Crash/Hang/Data loss" <rdar://problem/6315624>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58045 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 21:36:52 +00:00
Douglas Gregor 57c856b96e Clean up and document the representation of C++ base classes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58040 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 18:13:27 +00:00
Daniel Dunbar 4c877cc89b Hook "fast" code generation to -O0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58035 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 05:59:43 +00:00
Daniel Dunbar 70f92436f5 Add -O[0-3s] support (following llvm-gcc).
- Passes match llvm-gcc but many of the switches aren't wired.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58034 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 05:50:47 +00:00
Zhongxing Xu e564b52da5 Add an assertion to make our intention more clear.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58030 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 04:19:25 +00:00
Douglas Gregor 7a64a0329a If NDEBUG is set, don't include any of the code for visualizing inheritance hierarchies
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58029 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 03:52:39 +00:00
Zhongxing Xu e1911afd2a Let StoreManager do different cast on arrays. BasicStore will just keep it intact.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58028 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 03:10:39 +00:00
Ted Kremenek 4d8e5b803e Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58027 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 02:50:14 +00:00
Ted Kremenek f74675b5bb Temporarily mark this test XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58024 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 01:57:31 +00:00
Ted Kremenek 896cd9d150 Disable warning about potential leaks of returned values until we test it a little more (lots of noise).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58021 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 01:56:15 +00:00
Zhongxing Xu 6e78e1b22f Added a method to ElementRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58020 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 01:35:34 +00:00
Douglas Gregor bc0805a6ca Add support for conversions from a pointer-to-derived to a
pointer-to-base. Also, add overload ranking for pointer conversions
(for both pointer-to-void and derived-to-base pointer conversions).

Note that we do not yet diagnose derived-to-base pointer conversion
errors that stem from ambiguous or inacessible base classes. These
aren't handled during overload resolution; rather, when the conversion
is actually used we go ahead and diagnose the error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58017 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 00:40:37 +00:00
Ted Kremenek 9b3dc9166e Update Xcode project. We still get a link error, however, because of an LLVM library that isn't being linked in for CodeGen (will fix).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58015 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23 00:00:24 +00:00
Ted Kremenek 3ad2cc89ab Warn about potentially leaked objects that are returned from methods whose names do not follow the Cocoa Memory Management guidelines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58012 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 23:56:21 +00:00
Steve Naroff b9988c0c56 Fix <rdar://problem/6312683> clang block rewriter:
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58011 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 23:42:04 +00:00
Argyrios Kyrtzidis f1af6a70c3 Restrict creation of OverloadedFunctionDecl only to C++ (it was getting used for invalid redeclarations on C).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58008 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 23:08:24 +00:00
Steve Naroff 8970feab05 Fix <rdar://problem/6311947> clang on xcode (regression): error: use of undeclared identifier 'expandedValue'.
Mea culpa: I introduced this regresson in the following 2 commits: r57529 (10/14), r57841 (10/20).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58007 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 22:40:28 +00:00
Ted Kremenek e8ae7896b4 Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58005 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 21:53:52 +00:00
Douglas Gregor 5dea18948c Remove the GraphWriter-based version of the C++ class inheritance visualization, since it isn't being used and can't handle virtual bases properly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58002 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 21:25:12 +00:00
Douglas Gregor 0218936235 Added GraphViz visualization of C++ inheritance hierarchies.
Factored the QualTypeOrdering predicate into its own header
(TypeOrdering.h), now that it is used in two places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58001 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 21:13:31 +00:00
Argyrios Kyrtzidis 90b7bc6751 Now that DeclRefExpr accepts a NamedDecl, use a DeclRefExpr for when a CXXFieldDecl is referenced inside a method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 21:00:29 +00:00
Ted Kremenek 64e859a366 Enhance reference-count checker to correctly identify CG "release" functions. This fixes <rdar://problem/6303488>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57997 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 20:54:52 +00:00
Steve Naroff 7692ed6109 Fix <rdar://problem/6257675> error: member reference base type ('NSUserDefaults *') is not a structure or union.
Teach Sema::ActOnMemberReferenceExpr() to look through local category implementations associated with the class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 19:16:27 +00:00
Daniel Dunbar 8b7650ed5a Only create the target machine when emitting assembly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57993 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 18:29:51 +00:00
Douglas Gregor f8268ae319 Add representation of base classes in the AST, and verify that we
don't have duplicated direct base classes.

Seriliazation of base class specifiers is not yet implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57991 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 17:49:05 +00:00
Daniel Dunbar ed2cb28552 [LLVM up] Get rid of std::ostream usage from Backend.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57990 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 17:40:45 +00:00
Chris Lattner a778d7d973 Add support for assembler-with-cpp (preprocessed .S files), patch by
Roman Divacky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57988 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 17:29:21 +00:00
Ted Kremenek 70de68d216 Update server URL for checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57981 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 15:33:19 +00:00
Douglas Gregor ba7e210a99 QualType::isMoreQualifiedThan and isAtLeastAsQualifiedAs assert that we
aren't trying to compare with address-space qualifiers (for now).

Clean up handing of DeclRefExprs in Expr::isLvalue and refactor part
of the check into a static DeclCanBeLvalue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57980 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 15:04:37 +00:00
Zhongxing Xu c498848ebc Add test case for FuncDecl and function pointer variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57979 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 14:39:20 +00:00
Douglas Gregor 5737326601 Implement ranking of standard conversion sequences by their qualification
conversions (e.g., comparing int* -> const int* against 
int* -> const volatile int*); see C++ 13.3.3.2p3 bullet 3.

Add Sema::UnwrapSimilarPointerTypes to simplify the control flow of
IsQualificationConversion and CompareQualificationConversion (and fix
the handling of the int* -> volatile int* conversion in the former).
 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57978 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 14:17:15 +00:00
Zhongxing Xu c4bf72c544 Add a bunch of getLValue* methods to RegionStore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57977 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 13:44:38 +00:00
Zhongxing Xu c92e5feb73 Adjust parameter order to more natural one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57964 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 09:00:19 +00:00
Zhongxing Xu ed340f7d26 Exprs of function type is another special case for ImplicitCast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57963 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 08:02:16 +00:00
Douglas Gregor e0a5d5fe8e Move Sema::GetNonReferenceType to QualType::getNonReferenceType and make it inline
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57951 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 04:14:44 +00:00
Chris Lattner 4a76b292c9 some minor cleanups to ParseObjCTypeName:
1. Remove a bogus assertion, clients other than sema can return a
   null pointer from actions that result in ParseTypeName returning null.
2. Remove dead RParenLoc variable.
3. Simplify control flow handling error conditions.
4. On a major failure, we should skip until ')' not until '}'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57949 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 03:52:06 +00:00
Daniel Dunbar 11292b0ce0 Update to use raw_ostream for PrintModulePass.
- Stop playing fast and loose with the std stream.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57948 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 03:28:13 +00:00
Douglas Gregor 9b6e2d209c Fix a thinko in the qualification-conversion check when the qualificaitons are disjoint, and add some overloading-based tests of qualification conversions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57942 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 00:38:21 +00:00
Douglas Gregor ae8d467e75 Functions can be lvalues in C++, but not modifiable lvalues
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 00:03:08 +00:00
Daniel Dunbar d46075f8c3 Commito, didn't mean to remove this header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57938 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 23:54:00 +00:00
Daniel Dunbar d69bacc399 [LLVM up] Add basic -S option to clang.
- Split backend related consumer out into Backend.cpp, replaces
   LLVMCodeGenWriter.
 - Structure follows llvm-gcc to some extent.
 - Still need to implement all the options which impact code
   generation and the optimization passes which llvm-gcc uses at
   various levels.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57936 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 23:49:24 +00:00
Douglas Gregor 98cd599ee8 Initial step toward supporting qualification conversions (C++ 4.4).
Changes:
  - Sema::IsQualificationConversion determines whether we have a qualification
    conversion.
  - Sema::CheckSingleAssignment constraints now follows the C++ rules in C++,
    performing an implicit conversion from the right-hand side to the type of
    the left-hand side rather than checking based on the C notion of 
    "compatibility". We now rely on the implicit-conversion code to
    determine whether the conversion can happen or
    not. Sema::TryCopyInitialization has an ugly reference-related
    hack to cope with the initialization of references, for now.
  - When building DeclRefExprs, strip away the reference type, since
    there are no expressions whose type is a reference. We'll need to
    do this throughout Sema.
  - Expr::isLvalue now permits functions to be lvalues in C++ (but not
  in C).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57935 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 23:43:52 +00:00
Ted Kremenek cabeeed9cc Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57931 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 21:56:56 +00:00
Daniel Dunbar bd589e047f Add coverage of part of getPrimaryDecl that was failing prior to
previous commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57930 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 21:32:38 +00:00
Daniel Dunbar 48d04ae529 Fix use of dyn_cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57927 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 21:22:32 +00:00
Daniel Dunbar d8c0ea1a80 Add GetModule accessor to ModuleBuilder
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57924 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21 19:55:09 +00:00