summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Change the representation of builtin functions in the ASTEli Friedman2012-08-3127-44/+110
| | | | | | | | | (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. llvm-svn: 162962
* objective-C ARC: under -Wexplicit-ownership-type diagnose thoseFariborz Jahanian2012-08-304-2/+104
| | | | | | | method parameter types which are reference to an objective-C pointer to object with no explicit ownership. // rdar://10907090 llvm-svn: 162959
* [analyzer] Refactor the logic that determines if a functions should beAnna Zaks2012-08-306-17/+32
| | | | | | | | | | | | reanalyzed. The policy on what to reanalyze should be in AnalysisConsumer with the rest of visitation order logic. There is no reason why ExprEngine needs to pass the Visited set to CoreEngine, it can populate it itself. llvm-svn: 162957
* [analyzer] Remove cast inside dyn_cast.Anna Zaks2012-08-301-1/+1
| | | | llvm-svn: 162951
* [analyzer] Make analyzer-ipa=dynamic-bifurcate the default.Anna Zaks2012-08-304-5/+5
| | | | | | | There are two tests regressions that come from the fact that the Retain Count checker does not cancel out inlining of ObjC methods. llvm-svn: 162950
* [analyzer] Fixup for r162935 as per Jordan's review.Anna Zaks2012-08-303-5/+5
| | | | | | Thanks for catching this! llvm-svn: 162949
* Switch a couple getAs uses to castAs.Eli Friedman2012-08-301-2/+2
| | | | llvm-svn: 162948
* The presence of a user-*declared* constructor makes the defaultDouglas Gregor2012-08-302-6/+17
| | | | | | | constructor not user provided (and, therefore, non-trivial). Fixes <rdar://problem/11736429>. llvm-svn: 162947
* [analyzer] Disable diagnostic checking on the buildbot.Anna Zaks2012-08-301-6/+8
| | | | | | Due to recent diagnostic changes, we may generate malformed diagnostics. llvm-svn: 162940
* [analyzer] Plist diagnostics: Fix a case where we fail to close an XML tag.Jordan Rose2012-08-301-3/+2
| | | | | | | | | | If the current path diagnostic does /not/ have files associated with it, we were simply skipping on to the next diagnostic with 'continue'. But that also skipped the close tag for the diagnostic's <dict> node. Part of fixing our internal analyzer buildbot. llvm-svn: 162939
* Add -Wduplicate-enum warning. Clang will emit this warning when an implicitlyRichard Trieu2012-08-303-0/+273
| | | | | | | | | | | | | | | | initiated enum constant has the same value as another enum constant. For instance: enum test { A, B, C = -1, D, E = 1 }; Clang will warn that: A and D both have value 0 B and E both have value 1 A few exceptions are made to keep the noise down. Enum constants which are initialized to another enum constant, or an enum constant plus or minus 1 will not trigger this warning. Also, anonymous enums are not checked. llvm-svn: 162938
* Extend the "__is_pod" hack, which demotes various type trait keywordsDouglas Gregor2012-08-304-15/+66
| | | | | | | | | (__is_pod, __is_signed, etc.) to normal identifiers if they are encountered in certain places in the grammar where we know that prior versions of libstdc++ or libc++ use them, to still allow the use of these keywords as type traits. Fixes <rdar://problem/9836262> and PR10184. llvm-svn: 162937
* Fixes a bug for binding memoized match results.Manuel Klimek2012-08-305-94/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | Intorduces an abstraction for DynTypedNode which makes is impossible to create in ways that introduced the bug; also hides the implementation details of the template magic away from the user and prepares the code for adding QualType and TypeLoc bindings, as well as using DynTypedNode instead of overloads for child and ancestor matching. getNodeAs<T> was changed towards a non-pointer type, as we'll want QualType and TypeLoc nodes to be returned by value (the alternative would be to create new storage which is prohibitively costly if we want to use it for child / ancestor matching). DynTypedNode is moved into a new header ASTTypeTraits.h, as it is completely independent of the rest of the matcher infrastructure - if the need comes up, we can move it to a more common place. The interface for users before the introduction of the common storage change remains the same, minus the introduced bug, for which a regression test was added. llvm-svn: 162936
* [analyzer] Do not propagate the [super init] could be nil assumptionAnna Zaks2012-08-303-8/+78
| | | | | | | | from callee to caller. radar://12109638 llvm-svn: 162935
* Teach RetainCountChecker about 'pragma clang arc_cf_code_audited'.Ted Kremenek2012-08-302-0/+18
| | | | llvm-svn: 162934
* Fix missing 'clang' in pragma example in ARC doc.Ted Kremenek2012-08-301-2/+2
| | | | llvm-svn: 162933
* Rename 'MaxLoop' to 'maxBlockVisitOnPath' to reflect reality. WeTed Kremenek2012-08-303-3/+3
| | | | | | should consider renaming the command line option as well. llvm-svn: 162932
* Rename 'VisualizeEGUbi' and 'VisualizeEGDot' to ↵Ted Kremenek2012-08-304-11/+14
| | | | | | | | 'visualizeExplodedGraphWithUbigGraph' and 'visualizeExplodedGraphWithGraphViz' respectively. llvm-svn: 162931
* Rename AnalyzerOptions 'EagerlyAssume' to 'eagerlyAssumeBinOpBifurcation'.Ted Kremenek2012-08-305-26/+27
| | | | llvm-svn: 162930
* Store const& to AnalyzerOptions in AnalysisManager instead of copyingTed Kremenek2012-08-308-147/+80
| | | | | | individual flags. llvm-svn: 162929
* Move AnalyzerOptions.h to include/clang/StaticAnalyzer.Ted Kremenek2012-08-305-8/+8
| | | | llvm-svn: 162928
* Move Analyses.def to include/clang/StaticAnalyzer.Ted Kremenek2012-08-304-22/+22
| | | | llvm-svn: 162927
* objective-C: clang must implicitly convert Fariborz Jahanian2012-08-303-1/+32
| | | | | | | | | | | __objc_yes/__objc_no to (BOOL)1/(BOOL)0 when BOOL is declared; otherwise it resorts to default of 'signed char'. This is important to selecting the correct Numeric API numberWithBool: Can't have a clang test for this. Will checkin and executable llvm test. // rdar://12156616 llvm-svn: 162922
* Make preprocessor act in a GCC-compatible fashion when a macro is redefinedRichard Smith2012-08-306-12/+22
| | | | | | | | within its own argument list. The original definition is used for the immediate expansion, but the new definition is used for any subsequent occurences within the argument list or after the expansion. llvm-svn: 162906
* PR13652: Don't assume the parameter array on a FunctionTypeLoc for a lambda willRichard Smith2012-08-302-6/+6
| | | | | | | be filled in; they won't if the lambda's declarator has an invalid type. Instead take the parameters from the declarator directly. llvm-svn: 162904
* WWW: Force word wrapping of the content to avoid horizontal scrolling.Benjamin Kramer2012-08-301-2/+2
| | | | | | This isn't perfect but avoids overlap of the menu and the content. llvm-svn: 162903
* Change -analyzer-config to use '=' as the key-value separator, and onlyTed Kremenek2012-08-303-7/+5
| | | | | | support the '-analyzer-config key=val' variant. llvm-svn: 162891
* Reland r160052: Default to -std=c++11 on Windows.Nico Weber2012-08-306-12/+21
| | | | | | Also update the tests that rely on c++98 to explicitly mention that. llvm-svn: 162890
* Tooling: Add a runToolOnCodeWithArgs() function that allowsNico Weber2012-08-303-11/+32
| | | | | | | | passing additional parameters to a tool. Use this to fix a FIXME in testing code. llvm-svn: 162889
* Fix C++ comment in C sourceMichael Liao2012-08-301-1/+1
| | | | llvm-svn: 162887
* Fix a crash in type merging with enum types.Eli Friedman2012-08-302-3/+10
| | | | llvm-svn: 162886
* Emit .gcda files as absolute paths instead of relative paths.Bill Wendling2012-08-301-1/+3
| | | | | | | | | | | | This improves compatibility with gcc in this regard, and this file generation can be ameliorated with GCOV_PREFIX and GCOV_PREFIX_STRIP. It's also useful if your build directory doesn't specify -o <abspath> and it uses a recursive make structure, so it's not relative to the toplevel. Patch by Joshua Cranmer! <rdar://problem/12179524> llvm-svn: 162884
* Make this test portable.Ted Kremenek2012-08-301-0/+1
| | | | llvm-svn: 162880
* [analyzer] Stop tracking symbols based on a retain count summary ofAnna Zaks2012-08-292-27/+163
| | | | | | | | | | | | inlined function. This resolves retain count checker false positives that are caused by inlining ObjC and other methods. Essentially, if we are passing an object to a method with "delegate" in the selector or a function pointer as another argument, we should stop tracking the other parameters/return value as far as the retain count checker is concerned. llvm-svn: 162876
* [analyzer] Fixup 162863.Anna Zaks2012-08-293-8/+5
| | | | | | Thanks Jordan. llvm-svn: 162875
* Fix serious regression introduced in r157780 where __attribute__((NSObject))Ted Kremenek2012-08-292-8/+8
| | | | | | | | could not be attached to a CFTypeRef. Fixes <rdar://problem/12197822> llvm-svn: 162872
* Fix PR reference in test.Eli Friedman2012-08-291-4/+4
| | | | llvm-svn: 162866
* Fix run-line for test.Eli Friedman2012-08-291-1/+1
| | | | llvm-svn: 162865
* [analyzer]Fix typo, unbreak static analyzer BuildBot (at leastAnna Zaks2012-08-291-1/+4
| | | | | | | | partially). (Addresses a regression from r162790.) llvm-svn: 162864
* [analyzer] Improved diagnostic pruning for calls initializing values.Anna Zaks2012-08-2913-347/+1324
| | | | | | | | | | | | | | | | | | | | This heuristic addresses the case when a pointer (or ref) is passed to a function, which initializes the variable (or sets it to something other than '0'). On the branch where the inlined function does not set the value, we report use of undefined value (or NULL pointer dereference). The access happens in the caller and the path through the callee would get pruned away with regular path pruning. To solve this issue, we previously disabled diagnostic pruning completely on undefined and null pointer dereference checks, which entailed very verbose diagnostics in most cases. Furthermore, not all of the undef value checks had the diagnostic pruning disabled. This patch implements the following heuristic: if we pass a pointer (or ref) to the region (on which the error is reported) into a function and it's value is either undef or 'NULL' (and is a pointer), do not prune the function. llvm-svn: 162863
* Make alignment computation for pointer values for builtins handleEli Friedman2012-08-292-1/+12
| | | | | | non-pointer types with a pointer representation correctly. PR13660. llvm-svn: 162862
* Define __mips64 / __mips64__ macros for MIPS 64-bit targets.Simon Atanasyan2012-08-292-0/+7
| | | | | | The patch suggested by Brad Smith. llvm-svn: 162858
* Use getTargetDefines() virtual function in MipsTargetInfoBase successorsSimon Atanasyan2012-08-291-14/+12
| | | | | | | to define all macros for MIPS targets. Remove redundant virtual function getArchDefines(). Two virtual functions for this task are really too much. llvm-svn: 162853
* Factor out MIPS macro definitions common for all MIPS targets.Simon Atanasyan2012-08-291-12/+4
| | | | llvm-svn: 162852
* Move TLS check from LValueExprEvaluator::VisitVarDecl toHans Wennborg2012-08-292-5/+20
| | | | | | | | | | | CheckLValueConstantExpression. Richard pointed out that using the address of a TLS variable is ok in a core C++11 constant expression, as long as it isn't part of the eventual result of constant expression evaluation. Having the check in CheckLValueConstantExpression accomplishes this. llvm-svn: 162850
* objective-C: make -Widiomatic-parentheses workFariborz Jahanian2012-08-292-1/+14
| | | | | | | when assignment expression in conditional invloves property reference. // rdar://11066598 llvm-svn: 162846
* Fixed a problem with #pragma push_macro/pop_macro implementation.Alexander Kornienko2012-08-295-7/+37
| | | | | | | | | | | | | | | | | | | | Summary: The problem was with the following sequence: #pragma push_macro("long") #undef long #pragma pop_macro("long") in case when "long" didn't represent a macro. Fixed crash and removed code duplication for #undef/pop_macro case. Added regression tests. Reviewers: doug.gregor, klimek Reviewed By: doug.gregor CC: cfe-commits, chapuni Differential Revision: http://llvm-reviews.chandlerc.com/D31 llvm-svn: 162845
* Define _MIPS_ARCH and _MIPS_ARCH_<cpu name> macros for MIPS targets.Simon Atanasyan2012-08-292-0/+11
| | | | | | The patch suggested by Logan Chien. llvm-svn: 162840
* Reversing the logic since C99 mode is actually not an extension. Also, ↵Aaron Ballman2012-08-293-5/+5
| | | | | | changing the group to the singular to match the diagnostic better. llvm-svn: 162838
* Fix r162835 as per Richard's comments.Hans Wennborg2012-08-292-1/+8
| | | | | | | VisitVarDecl should return Error(E), and we should test that the address of a TLS var can't be used as a constexpr. llvm-svn: 162837
OpenPOWER on IntegriCloud