Switch a couple getAs uses to castAs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162948 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fixup for r162935 as per Jordan's review.

Thanks for catching this!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162949 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Make analyzer-ipa=dynamic-bifurcate the default.

There are two tests regressions that come from the fact that the Retain
Count checker does not cancel out inlining of ObjC methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162950 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Remove cast inside dyn_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162951 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Refactor the logic that determines if a functions should be
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162957 91177308-0d34-0410-b5e6-96231b3b80d8
objective-C ARC: under -Wexplicit-ownership-type diagnose those
method parameter types which are reference to an objective-C
pointer to object with no explicit ownership. // rdar://10907090



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162959 91177308-0d34-0410-b5e6-96231b3b80d8
Change the representation of builtin functions in the AST
(__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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162962 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fix a crash in plist-html generation introduced in r162939.

Basically, do the correct thing to fix the XML generation error, rather
than making it even worse by unilaterally dereferencing a null pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162964 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Ensure that PathDiagnostics profile the same regardless of path.

PathDiagnostics are actually profiled and uniqued independently of the
path on which the bug occurred. This is used to merge diagnostics that
refer to the same issue along different paths, as well as by the plist
diagnostics to reference files created by the HTML diagnostics.

However, there are two problems with the current implementation:

1) The bug description is included in the profile, but some
   PathDiagnosticConsumers prefer abbreviated descriptions and some
   prefer verbose descriptions. Fixed by including both descriptions in
   the PathDiagnostic objects and always using the verbose one in the profile.

2) The "minimal" path generation scheme provides extra information about
   which events came from macros that the "extensive" scheme does not.
   This resulted not only in different locations for the plist and HTML
   diagnostics, but also in diagnostics being uniqued in the plist output
   but not in the HTML output. Fixed by storing the "end path" location
   explicitly in the PathDiagnostic object, rather than trying to find the
   last piece of the path when the diagnostic is requested.

This should hopefully finish unsticking our internal buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162965 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[analyzer] Disable diagnostic checking on the buildbot."

This reverts commit befc0f648c83f65e1f3567f2058c7c18b4bc3ad8 now that
plist-html diagnostics are working again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162966 91177308-0d34-0410-b5e6-96231b3b80d8
Comment HTML tag name machers: move from StringSwitch to an efficient
TableGen-generated string matcher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162969 91177308-0d34-0410-b5e6-96231b3b80d8
Make a bunch of methods on Lexer private.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162970 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation: add missing word "accepts".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162971 91177308-0d34-0410-b5e6-96231b3b80d8
DeclPrinter tests: since now some platforms use C++11 by default, make it
explicitly visible in test cases which language variant is used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162974 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation: correct a typo introduced in r162971.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162975 91177308-0d34-0410-b5e6-96231b3b80d8
DeclPrinter tests: simplify the code by using the new runToolOnCodeWithArgs
function from Tooling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162976 91177308-0d34-0410-b5e6-96231b3b80d8
Move AnalyzerOptions.h into 'Core' StaticAnalyzer sub-library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162977 91177308-0d34-0410-b5e6-96231b3b80d8
Make AnalyzerOptions a shared object between CompilerInvocation and
AnalysisManager, allowing the StringMap of configuration values to
be propagated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162978 91177308-0d34-0410-b5e6-96231b3b80d8
Use LLVM_DELETED_FUNCTION instead of a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162985 91177308-0d34-0410-b5e6-96231b3b80d8
Remove the useless CommentOptions class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162986 91177308-0d34-0410-b5e6-96231b3b80d8