summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen] Add support for IncompleteArrayType in Obj-C ivars.Volodymyr Sapsai2017-10-271-0/+5
| | | | | | | | | | | | | | | | | | | Fixes an assertion failure when ivar is a struct containing incomplete array. Also completes support for direct flexible array members. rdar://problem/21054495 Reviewers: rjmccall, theraven Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38774 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316723 91177308-0d34-0410-b5e6-96231b3b80d8
* [WebAssembly] Include libclang_rt.builtins in the standard waySam Clegg2017-10-273-11/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D39218 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316719 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Add 'sse4' to X86TargetInfo::isValidFeatureNameCraig Topper2017-10-271-0/+1
| | | | | | sse4 is valid for target attribute and functions as an alias of sse4.2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316718 91177308-0d34-0410-b5e6-96231b3b80d8
* Use -fuse-init-array if no gcc installation is found.Nico Weber2017-10-261-1/+2
| | | | | | | | | | | | | | | | | clang currently uses .init_array instead of .ctors on Linux if it detects gcc 4.7+. Make it so that it also uses .init_array if no gcc installation is found at all – if there's no old gcc, there's nothing we need to be compatible with. icecc for example runs clang in a very small chroot, so before this change clang would use .ctors if run under icecc. And lld currently silently mislinks inputs with .ctors sections, so before this clang + icecc + lld would produce broken binaries. (But this seems like a good change independent of that lld bug.) https://reviews.llvm.org/D39317 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316713 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Make -march=i686 an alias of -march=pentiumproCraig Topper2017-10-262-14/+3
| | | | | | | | I think the only reason they are different is because we don't set tune_i686 for -march=i686 to match GCC. But GCC 4.9.0 seems to have changed this behavior and they do set it now. So I think they can aliases now. Differential Revision: https://reviews.llvm.org/D39349 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316712 91177308-0d34-0410-b5e6-96231b3b80d8
* [CGBlocks] Improve line info in backtraces containing *_helper_blockVedant Kumar2017-10-261-6/+2
| | | | | | | | | | | | | | | | | | Instead of only setting a non-zero debug location on the return instruction in *_helper_block functions, set a proper location on all instructions within these functions. Pick the start location of the block literal expr for maximum clarity. The debugger does not step into *_helper_block functions during normal single-stepping because we mark their parameters as artificial. This is what we want (the functions are implicitly generated and uninteresting to most users). The stepping behavior is unchanged by this patch. rdar://32907581 Differential Revision: https://reviews.llvm.org/D39310 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316704 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify codegen and debug info generation for block context parameters.Adrian Prantl2017-10-263-24/+13
| | | | | | | | | | | | | | | | | | | | The exisiting code goes out of its way to put block parameters into an alloca only at -O0, and then describes the funciton argument with a dbg.declare, which is undocumented in the LLVM-CFE contract and does not actually behave as intended after LLVM r642022. This patch just generates the alloca unconditionally, the mem2reg pass will eliminate it at -O1 and up anyway and points the dbg.declare to the alloca as intended (which mem2reg will then correctly rewrite into a dbg.value). This reapplies r316684 with some dead code removed. rdar://problem/35043980 Differential Revision: https://reviews.llvm.org/D39305 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316689 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Simplify codegen and debug info generation for block context ↵Adrian Prantl2017-10-263-14/+22
| | | | | | | | parameters." This reverts commit r316684 while investigating buildbot breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316686 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify codegen and debug info generation for block context parameters.Adrian Prantl2017-10-263-22/+14
| | | | | | | | | | | | | | | | | | The exisiting code goes out of its way to put block parameters into an alloca only at -O0, and then describes the funciton argument with a dbg.declare, which is undocumented in the LLVM-CFE contract and does not actually behave as intended after LLVM r642022. This patch just generates the alloca unconditionally, the mem2reg pass will eliminate it at -O1 and up anyway and points the dbg.declare to the alloca as intended (which mem2reg will then correctly rewrite into a dbg.value). rdar://problem/35043980 Differential Revision: https://reviews.llvm.org/D39305 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316684 91177308-0d34-0410-b5e6-96231b3b80d8
* Move MS inline asm parser methods out of line to reduce indentation, NFCReid Kleckner2017-10-261-98/+118
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316674 91177308-0d34-0410-b5e6-96231b3b80d8
* Add objcCategoryImplDecl matcherDave Lee2017-10-261-0/+1
| | | | | | | | | | | | | | | | | Summary: Add `objcCategoryImplDecl` which matches ObjC category definitions (`@implementation`). This matcher complements `objcCategoryDecl` (`@interface`) which was added in D30854. Reviewers: aaron.ballman, malcolm.parsons, alexshap Reviewed By: aaron.ballman Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D39293 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316670 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other ↵Roman Lebedev2017-10-261-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than NULL. Summary: The warning was initially introduced in D32914 by @thakis, and the concerns were raised there, and later in rL302247 and PR33771. I do believe that it makes sense to relax the diagnostic e.g. in this case, when the expression originates from the system header, which can not be modified. This prevents adoption for the diagnostic for codebases which use pthreads (`PTHREAD_MUTEX_INITIALIZER`), gtest, etc. As @malcolm.parsons suggests, it *may* make sense to also not warn for the template types, but it is not obvious to me how to do that in here. Though, it still makes sense to complain about `NULL` macro. While there, add more tests. Reviewers: dblaikie, thakis, rsmith, rjmccall, aaron.ballman Reviewed By: thakis Subscribers: Rakete1111, hans, cfe-commits, thakis, malcolm.parsons Tags: #clang Differential Revision: https://reviews.llvm.org/D38954 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316662 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to fix warnings and windows test failures caused by r316653Eric Liu2017-10-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316661 91177308-0d34-0410-b5e6-96231b3b80d8
* [Tooling] A new framework for executing clang frontend actions.Eric Liu2017-10-266-8/+193
| | | | | | | | | | | | | | | | | | | | | | | Summary: This defines a `clang::tooling::ToolExecutor` interface that can be extended to support different execution plans including standalone execution on a given set of TUs or parallel execution on all TUs in a codebase. In order to enable multiprocessing execution, tool actions are expected to output result into a `ToolResults` interface provided by executors. The `ToolResults` interface abstracts how results are stored e.g. in-memory for standalone executions or on-disk for large-scale execution. New executors can be registered as `ToolExecutorPlugin`s via the `ToolExecutorPluginRegistry`. CLI tools can use `createExecutorFromCommandLineArgs` to create a specific registered executor according to the command-line arguments. This patch also implements `StandaloneToolExecutor` which has the same behavior as the current `ClangTool` interface, i.e. execute frontend actions on a given set of TUs. At this point, it's simply a wrapper around `ClangTool` at this point. This is still experimental but expected to replace the existing `ClangTool` interface so that specific tools would not need to worry about execution. Reviewers: klimek, arphaman, hokein, sammccall Reviewed By: klimek Subscribers: cfe-commits, djasper, mgorny, omtcyfz Differential Revision: https://reviews.llvm.org/D34272 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316653 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix overloaded static functions in SemaCodeCompleteBenjamin Kramer2017-10-262-9/+23
| | | | | | | | | | | | | | | | | | | | | https://bugs.llvm.org/show_bug.cgi?id=33904 Happens when static function is accessed via the class variable. That leads to incorrect overloads number because the variable is considered as the first argument. struct Bar { static void foo(); static void foo(int); }; int main() { Bar b; b.foo(/*complete here*/); // did not work before Bar::foo(/*complete here*/); // worked fine } Patch by Ivan Donchevskii! Differential Revision: https://reviews.llvm.org/D36390 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316646 91177308-0d34-0410-b5e6-96231b3b80d8
* [LSan] Enable -fsanitize=leak for PPC64 Linux.Alex Shlyapnikov2017-10-261-1/+1
| | | | | | | | | | | | Summary: . Reviewers: eugenis Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39312 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316636 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow StmtPrinter to supress implicit 'this' and 'self' base expressionsAlex Lorenz2017-10-261-9/+33
| | | | | | | | | This will be useful for certain refactoring actions. rdar://34202062 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316631 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analyzer] Give more descriptive name to BdyFrm field.George Karpenkov2017-10-251-3/+3
| | | | | | Discussion at: https://reviews.llvm.org/D39220 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316617 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Print an error if you try to compile with < sm_30 on CUDA 9.Justin Lebar2017-10-253-8/+22
| | | | | | | | | | | | | | Summary: CUDA 9's minimum sm is sm_30. Ideally we should also make sm_30 the default when compiling with CUDA 9, but that seems harder than it should be. Subscribers: sanjoy Differential Revision: https://reviews.llvm.org/D39109 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316611 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable -pie and --enable-new-dtags by default on Android.Evgeniy Stepanov2017-10-253-6/+18
| | | | | | | | | | | | | | | Summary: Also enable -no-pie on Gnu toolchain (previously available on Darwin only). Non-PIE executables won't even start on recent Android, and DT_RPATH is ignored by the loader. Reviewers: srhines, danalbert Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38430 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316606 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore implicity casts for zero-as-null-pointer-constant warningErich Keane2017-10-251-1/+1
| | | | | | | | | | | The repro in https://bugs.llvm.org/show_bug.cgi?id=34362 caused the left nullptr to be cast to a int* implicitly, which resulted diagnosing this falsely. Differential Revision: https://reviews.llvm.org/D39301 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316605 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen: fix PPC Darwin variadicsSaleem Abdulrasool2017-10-251-1/+37
| | | | | | | | | Darwin uses char * for the variadic list type (va_list). We use the PPC SVR4 ABI for PPC, which uses a structure type for the va_list. When constructing the GEP, we would fail due to the incorrect handling for the va_list. Correct this to use the right type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316599 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Add avx512vpopcntdq to Knights MillCraig Topper2017-10-251-0/+2
| | | | | | As indicated by Table 1-1 in Intel Architecture Instruction Set Extensions and Future Features Programming Reference from October 2017. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316593 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Improve debug info for taskgroup implicitly generatedAlexey Bataev2017-10-251-15/+13
| | | | | | expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316585 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Constify function parameters, NFC.Alexey Bataev2017-10-251-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316584 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support of the next Debian (Debian buster - version 10)Sylvestre Ledru2017-10-251-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316579 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support of the next Ubuntu (Ubuntu 18.04 - Bionic Beaver)Sylvestre Ledru2017-10-251-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316577 91177308-0d34-0410-b5e6-96231b3b80d8
* [rename] support renaming class member.Haojian Wu2017-10-251-0/+49
| | | | | | | | | | | | Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D39178 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316571 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-rename] Fix and enable the failing TemplatedClassFunction test.Haojian Wu2017-10-251-0/+20
| | | | | | | | | | | | Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D39241 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316561 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen: fix a case of incorrect checks for ivarsSaleem Abdulrasool2017-10-251-4/+8
| | | | | | | | Ensure that we check the ivar containing decl for the DLL storage attribute rather than the ivar itself as the dll storage is associated to the interface decl not the ivar decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316545 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analyzer] Remove spaces inside comments mentioning the parameter name,George Karpenkov2017-10-251-34/+34
| | | | | | | to aid clang-tidy comprehension. Requested by @alexfh in https://reviews.llvm.org/D39015 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316539 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analyzer] Store BodyFarm in std::unique_ptrGeorge Karpenkov2017-10-241-7/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D39220 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316536 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sema][ObjC] Look for either objc_bridge or objc_bridge_mutable whenAkira Hatanaka2017-10-241-6/+13
| | | | | | | | | | | | determining whether a RecordDecl is CFError. CFErrorRef used to be declared with "objc_bridge(NSError)" but is now declared with "objc_bridge_mutable(NSError)". Look for either when checking whether a RecordDecl is CFError. rdar://problem/35034779 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316531 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct behavior of fastcall when default CC is set.Erich Keane2017-10-241-1/+1
| | | | | | | | | | | | Fastcall doesn't support variadic function calls, so setting the default calling convention to Fastcall would result in incorrect code being emitted for these conditions. This patch adds a 'variadic' test to the default calling conv test, as well as fixes the behavior of fastcall. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316528 91177308-0d34-0410-b5e6-96231b3b80d8
* Replaced unicode characters with ASCII, as introduced in r316518.Erich Keane2017-10-241-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316521 91177308-0d34-0410-b5e6-96231b3b80d8
* mplement __has_unique_object_representationsErich Keane2017-10-243-0/+150
| | | | | | | | | | | | | A helper builtin to facilitate implementing the std::has_unique_object_representations type trait. Requested here: https://bugs.llvm.org/show_bug.cgi?id=34942 Also already exists in GCC and MSVC. Differential Revision: https://reviews.llvm.org/D39064 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316518 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix PR35013: Fix passing VLAs captures to outlined functions.Alexey Bataev2017-10-241-1/+7
| | | | | | | Fixed passing of VLAs and variably-modified types to outlined functions. Synchronized passing with the types codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316488 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen: Fix missing debug loc due to allocaYaxun Liu2017-10-241-2/+1
| | | | | | | | | | | | | Builder save/restores insertion pointer when emitting addr space cast for alloca, but does not save/restore debug loc, which causes verifier failure for certain call instructions. This patch fixes that. Differential Revision: https://reviews.llvm.org/D39069 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316484 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing clangRewrite lib dependency for clangToolingRefactorAlex Lorenz2017-10-241-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316467 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] Initial outline of implementation of "extract function" refactoringAlex Lorenz2017-10-244-0/+319
| | | | | | | | | | | | | | | | | | | | This commit adds an initial, skeleton outline of the "extract function" refactoring. The extracted function doesn't capture variables / rewrite code yet, it just basically does a simple copy-paste. The following initiation rules are specified: - extraction can only be done for executable code in a function/method/block. This means that you can't extract a global variable initialize into a function right now. - simple literals and references are not extractable. This commit also adds support for full source ranges to clang-refactor's test mode. Differential Revision: https://reviews.llvm.org/D38982 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316465 91177308-0d34-0410-b5e6-96231b3b80d8
* [code completion] Complete ObjC methods in @implementation without leadingAlex Lorenz2017-10-242-13/+26
| | | | | | | | | '-'/'+' prefix rdar://12040840 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316458 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not add a colon chunk to the code completion of class inheritance access ↵Erik Verbruggen2017-10-242-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | modifiers With enabled CINDEXTEST_CODE_COMPLETE_PATTERNS env option (which enables IncludeCodePatterns in completion options) code completion after colon currently suggests access modifiers with 2 completion chunks which is incorrect. Example: class A : <Cursor>B { } Currently we get 'NotImplemented:{TypedText public}{Colon :} (40)' but the correct line is just 'NotImplemented:{TypedText public} (40)' The fix introduces more specific scope that occurs between ':' and '{' It allows us to determine when we don't need to add ':' as a second chunk to the public/protected/private access modifiers. Patch by Ivan Donchevskii! Differential Revision: https://reviews.llvm.org/D38618 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316436 91177308-0d34-0410-b5e6-96231b3b80d8
* [Tooling] Add a factory method for CommonOptionsParserEric Liu2017-10-241-6/+39
| | | | | | | | | | | | | | Summary: This returns error instead of exiting the program in case of error. Reviewers: klimek, hokein Reviewed By: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39042 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316433 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Fix PR34625 -mtune without -mcpu should not set -target-cpuPeter Smith2017-10-241-6/+10
| | | | | | | | | | | | | | | | | | | | | | | When -mtune is used on AArch64 the -target-cpu is passed the value of the cpu given to -mtune. As well as setting micro-architectural features of the -mtune cpu, this will also add the architectural features such as support for instructions. This can result in the backend using instructions that are supported in the -mtune cpu but not supported in the target architecture. For example use of the v8.1-a LSE extensions with -march=v8. This change removes the setting of -target-cpu for -mtune, the -mcpu must be used to set -target-cpu. This has the effect of removing all non-hard coded benefits of mtune but it does produce correct output when -mtune cpu with a later architecture than v8 is used. Fixes PR34625 Differential Revision: https://reviews.llvm.org/D39179 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316424 91177308-0d34-0410-b5e6-96231b3b80d8
* Unnamed bitfields don't block constant evaluation of constexpr ctorsJordan Rose2017-10-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | C++14 [dcl.constexpr]p4 states that in the body of a constexpr constructor, > every non-variant non-static data member and base class sub-object shall be initialized However, [class.bit]p2 notes that > Unnamed bit-fields are not members and cannot be initialized. Therefore, we should make sure to filter them out of the check that all fields are initialized. Fixing this makes the constant evaluator a bit smarter, and specifically allows constexpr constructors to avoid tripping -Wglobal-constructors when the type contains unnamed bitfields. Reviewed at https://reviews.llvm.org/D39035. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316408 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix template parameter default args missed if redecledErich Keane2017-10-241-1/+6
| | | | | | | | | | | | | | | | | | This bug was found via self-build on lld, and worked around here: https://reviews.llvm.org/rL316180 The issue is that the 'using' causes the lookup to pick up the first decl. However, when setting inherited default parameters, we only update 'forward', not 'backward'. SO, only the newest param list has all the information about the default arguments. This patch ensures that the list of parameters we look through checks the newest decl's template parameter list so it doesn't miss a default. Differential Revision: https://reviews.llvm.org/D39127 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316405 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analyzer] Fix for the memory leak: fix typo in if-statement.George Karpenkov2017-10-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316403 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analyzer] Handle implicit function reference in bodyfarming std::call_onceGeorge Karpenkov2017-10-241-8/+20
| | | | | | Differential Revision: https://reviews.llvm.org/D39201 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316402 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analyzer] Do not use static storage to for implementations created in ↵George Karpenkov2017-10-234-102/+39
| | | | | | | | BodyFarm.cpp Differential Revision: https://reviews.llvm.org/D39208 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316400 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fix handling of labels in getLValueElementAlexander Shaposhnikov2017-10-231-1/+4
| | | | | | | | | | | | In getLValueElement Base may represent the address of a label (as in the newly-added test case), in this case it's not a loc::MemRegionVal and Base.castAs<loc::MemRegionVal>() triggers an assert, this diff makes getLValueElement return UnknownVal instead. Differential revision: https://reviews.llvm.org/D39174 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316399 91177308-0d34-0410-b5e6-96231b3b80d8