[PATCH] D44786: Lowering x86 adds/addus/subs/subus intrinsics (clang)

2018-03-30 Thread Tomasz Krupa via Phabricator via cfe-commits
tkrupa updated this revision to Diff 140401. Repository: rC Clang https://reviews.llvm.org/D44786 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx2-builtins.c test/CodeGen/avx512bw-builtins.c test/CodeGen/avx512vlbw-builtins.c test/CodeGen/sse2-builtins.c Index:

[PATCH] D45081: [analyzer] Remove the unused method declaration in `ValistChecker.cpp`.

2018-03-30 Thread Henry Wong via Phabricator via cfe-commits
MTC created this revision. MTC added a reviewer: xazax.hun. Herald added subscribers: cfe-commits, a.sidorin, rnkovacs, szepet. Herald added a reviewer: george.karpenkov. `getVariableNameFromRegion()` seems useless. Repository: rC Clang https://reviews.llvm.org/D45081 Files:

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-03-30 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. Thanks for your review, NoQ! > Why do you need separate code for null and non-null character? The function's > semantics doesn't seem to care. Thank you for your advice, I will remove the duplicate code! > I'd rather consider the case of non-concrete character separately.

[PATCH] D41168: [X86] Lowering X86 avx512 sqrt intrinsics to IR

2018-03-30 Thread Tomasz Krupa via Phabricator via cfe-commits
tkrupa updated this revision to Diff 140409. tkrupa added a comment. Removed renaming of the builtins (also in corresponding llvm patch). Repository: rC Clang https://reviews.llvm.org/D41168 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx-builtins.c test/CodeGen/avx512f-builtins.c

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-30 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping. Could someone with commit rights please commit this? @szepet or @xazax.hun ? Repository: rC Clang https://reviews.llvm.org/D43967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41168: [X86] Lowering X86 avx512 sqrt intrinsics to IR

2018-03-30 Thread Tomasz Krupa via Phabricator via cfe-commits
tkrupa commandeered this revision. tkrupa added a reviewer: uriel.k. tkrupa added a comment. I was assigned to finish this task. https://reviews.llvm.org/D41168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-03-30 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 140405. MTC added a comment. According to @NoQ's suggestion, remove the duplicated code. Repository: rC Clang https://reviews.llvm.org/D44934 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-30 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 added a comment. In fact I think about mul only because of X86 nature: it always put the mul result in wider place (than its args). (Don't know about other CPUs - maybe the same?) As result we could change the current design to reflect this feature: 8bit x 8bit -> 16bit 16bit x 16bit ->

[PATCH] D45081: [analyzer] Remove the unused method declaration in `ValistChecker.cpp`.

2018-03-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. LG! Thanks! Repository: rC Clang https://reviews.llvm.org/D45081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45045: [DebugInfo] Generate debug information about labels

2018-03-30 Thread Wei-Ren Chen via Phabricator via cfe-commits
chenwj requested changes to this revision. chenwj added a comment. This revision now requires changes to proceed. Nits. Comment at: lib/CodeGen/CGDebugInfo.cpp:3644 +void CGDebugInfo::EmitLabel(const LabelDecl *D, + CGBuilderTy ) { + assert(DebugKind

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-30 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:1347 +} else if (Current.isOneOf(tok::identifier, tok::kw_new) && + Current.Previous && Current.Previous->is(TT_CastRParen) && + Current.Previous->MatchingParen &&

[PATCH] D45094: [LibTooling] Make interface of VFS injection into ClangTool more user-friendly

2018-03-30 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added reviewers: alexfh, klimek. whisperity added a project: clang. Herald added subscribers: dkrupp, rnkovacs. This patch extends upon https://reviews.llvm.org/D41947 because the interface that was landed from that patch isn't much user-friendly.

[PATCH] D44494: [libunwind] Support __register_frame with a full .eh_frame section

2018-03-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 140410. mstorsjo edited the summary of this revision. mstorsjo added a comment. Herald added a subscriber: JDevlieghere. Added and using a helper function `isCIE` to avoid using the error return path from `decodeFDE`. Technically, the decision between a

[PATCH] D44994: [clang-format] Ensure wrapped ObjC selectors with 1 arg obey IndentWrappedFunctionNames

2018-03-30 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. Looks good. Repository: rC Clang https://reviews.llvm.org/D44994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D44602#1047574, @lebedev.ri wrote: > - No longer count variables declared in macro expansion. Please see FIXME, i > think this is too broad. Ping, thoughts? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44602

r328871 - [clang-format] Ensure wrapped ObjC selectors with 1 arg obey IndentWrappedFunctionNames

2018-03-30 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Fri Mar 30 08:38:45 2018 New Revision: 328871 URL: http://llvm.org/viewvc/llvm-project?rev=328871=rev Log: [clang-format] Ensure wrapped ObjC selectors with 1 arg obey IndentWrappedFunctionNames Summary: In D43121, @Typz introduced logic to avoid indenting 2-or-more

[PATCH] D44994: [clang-format] Ensure wrapped ObjC selectors with 1 arg obey IndentWrappedFunctionNames

2018-03-30 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328871: [clang-format] Ensure wrapped ObjC selectors with 1 arg obey… (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D44994?vs=140271=140436#toc

[PATCH] D44994: [clang-format] Ensure wrapped ObjC selectors with 1 arg obey IndentWrappedFunctionNames

2018-03-30 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. benhamilton marked an inline comment as done. Closed by commit rL328871: [clang-format] Ensure wrapped ObjC selectors with 1 arg obey… (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits.

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. While X86 does have multiplies that return double width results, it also has 16/32/64-bit forms of imul that only return the lower portion of the result. Those multiplies are typically faster and have fewer uops than the double width multiplies so we prefer to use

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-30 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:1347 +} else if (Current.isOneOf(tok::identifier, tok::kw_new) && + Current.Previous && Current.Previous->is(TT_CastRParen) && + Current.Previous->MatchingParen &&

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 140411. lebedev.ri added a comment. - Rebased - Created https://reviews.llvm.org/D45082 with llvm diff to prevent stage2 failure, and to disscuss the options. Similar diff will be needed at least for libc++ tests. Repository: rC Clang

r328860 - [analyzer] Remove the unused method declaration in `ValistChecker.cpp`.

2018-03-30 Thread Henry Wong via cfe-commits
Author: henrywong Date: Fri Mar 30 06:37:50 2018 New Revision: 328860 URL: http://llvm.org/viewvc/llvm-project?rev=328860=rev Log: [analyzer] Remove the unused method declaration in `ValistChecker.cpp`. Summary: `getVariableNameFromRegion()` seems useless. Reviewers: xazax.hun, george.karpenkov

[PATCH] D45081: [analyzer] Remove the unused method declaration in `ValistChecker.cpp`.

2018-03-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328860: [analyzer] Remove the unused method declaration in `ValistChecker.cpp`. (authored by henrywong, committed by ). Changed prior to commit: https://reviews.llvm.org/D45081?vs=140408=140419#toc

[PATCH] D45045: [DebugInfo] Generate DILabel metadata for labels.

2018-03-30 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai updated this revision to Diff 140423. HsiangKai retitled this revision from "[DebugInfo] Generate debug information about labels" to "[DebugInfo] Generate DILabel metadata for labels.". HsiangKai edited the summary of this revision. HsiangKai added a comment. 1. No generating

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-03-30 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added reviewers: rsmith, hfinkel. Diagnostics print _Bool as bool when the latter is defined as the former. However, diagnostics were altering the printing policy for -ast-print as well. The printed source was then invalid because the preprocessor eats the

[PATCH] D45086: [analyzer] Unroll the loop when it has a unsigned counter.

2018-03-30 Thread Henry Wong via Phabricator via cfe-commits
MTC created this revision. MTC added reviewers: szepet, a.sidorin, NoQ. Herald added subscribers: cfe-commits, rnkovacs, xazax.hun. Herald added a reviewer: george.karpenkov. MTC edited the summary of this revision. The original implementation in the `LoopUnrolling.cpp` didn't consider the case

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FindSymbols.cpp:31 + + if (supportedSymbolKinds && + std::find(supportedSymbolKinds->begin(), supportedSymbolKinds->end(), malaperle wrote: > MaskRay wrote: > > This std::find loop adds some overhead to

[PATCH] D44854: [analyzer] Be more careful about C++17 copy elision.

2018-03-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:215 + // able to find construction context at all. + CallOpts.IsCtorOrDtorWithImproperlyModeledTargetRegion = true; +} else if (!isa( george.karpenkov

[PATCH] D45086: [analyzer] Unroll the loop when it has a unsigned counter.

2018-03-30 Thread Peter Szecsi via Phabricator via cfe-commits
szepet accepted this revision. szepet added a comment. Yepp, thanks for the patch! One small typo below. Comment at: test/Analysis/loop-unrolling.cpp:50 + +int simple_unroll4_unsinged() { + int a[9]; typo: unsigned Repository: rC Clang

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FindSymbols.cpp:31 + + if (supportedSymbolKinds && + std::find(supportedSymbolKinds->begin(), supportedSymbolKinds->end(), MaskRay wrote: > malaperle wrote: > > MaskRay wrote: > > > This std::find loop adds

[PATCH] D44494: [libunwind] Support __register_frame with a full .eh_frame section

2018-03-30 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. The "struct object" is an implementation detail of the unwind implementation. You are guaranteed historically to get at least 8 longs / 8 pointers for internal use statically allocated in each object. What is stored inside is up to the unwind implementation.

[PATCH] D44955: [CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr.

2018-03-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. LGTM with a nit, provided a proper fix can not be landed in a timely enough matter. Comment at: lib/Analysis/CFG.cpp:740

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-30 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 140459. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed feedback https://reviews.llvm.org/D45059 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt

[PATCH] D45101: [ObjC] Use the name specified by objc_runtime_name instead of the class identifier

2018-03-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. This patch fixes a few places in CGObjCMac.cpp where the class identifier was used instead of the name specified by objc_runtime_name. rdar://problem/37910822 Repository: rC Clang https://reviews.llvm.org/D45101 Files:

[PATCH] D44552: [Coroutines] Find custom allocators in class scope

2018-03-30 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov accepted this revision. GorNishanov added a comment. This revision is now accepted and ready to land. LGTM with some stylistic suggestions Comment at: lib/Sema/SemaExprCXX.cpp:2351 +return true; + else +LookupQualifiedName(R,

[PATCH] D45061: [NVPTX, CUDA] Use custom feature detection to handle NVPTX target builtins.

2018-03-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Basic/Cuda.h:55 +static inline const std::vector CudaKnownArchList() { + return {CudaArch::SM_20, CudaArch::SM_21, CudaArch::SM_30, CudaArch::SM_32, jlebar wrote: > Why 'static'? Old habits. Just

[PATCH] D45086: [analyzer] Unroll the loop when it has a unsigned counter.

2018-03-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. Looks reasonable Repository: rC Clang https://reviews.llvm.org/D45086 ___ cfe-commits mailing list

[PATCH] D44955: [CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr.

2018-03-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 140464. NoQ added a comment. Use auto. https://reviews.llvm.org/D44955 Files: include/clang/Analysis/ConstructionContext.h lib/Analysis/CFG.cpp lib/Analysis/ConstructionContext.cpp test/Analysis/missing-bind-temporary.cpp Index:

[PATCH] D45096: Allow the creation of human-friendly ASTDumper to arbitrary output stream

2018-03-30 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added reviewers: alexfh, klimek, rsmith. whisperity added a project: clang. Herald added subscribers: dkrupp, rnkovacs. `ASTPrinter` allows setting the ouput to any O-Stream, but that printer creates source-code-like syntax (and is also marked with a

[PATCH] D45071: [analyzer] Track null or undef values through pointer arithmetic.

2018-03-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. LGTM with a nit. Also I don't quite understand why being additive is important? Isn't pointer subtraction basically the same? Comment at:

[PATCH] D44854: [analyzer] Be more careful about C++17 copy elision.

2018-03-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. LGTM provided comments are answered. Field rename would be appreciated, if possible. Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:215 +

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-30 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Thanks for the feedback! > You noted, that the C++ warning would catch this case, but does not get > triggered in C. Would it be wort to generalize the concern and have a warning > that catch the comparison, regardless of the macro? I'm not quite sure how we

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. You noted, that the C++ warning would catch this case, but does not get triggered in C. Would it be wort to generalize the concern and have a warning that catch the comparison, regardless of the macro? Do other major libraries define a similar macro but name it

r328891 - Remove unused CHECK lines leftover from r306928.

2018-03-30 Thread Eli Friedman via cfe-commits
Author: efriedma Date: Fri Mar 30 11:39:28 2018 New Revision: 328891 URL: http://llvm.org/viewvc/llvm-project?rev=328891=rev Log: Remove unused CHECK lines leftover from r306928. The RUN lines were removed, but the corresponding CHECK lines never went away. Modified:

[PATCH] D45102: Fix typo in comment -fmath-errno=0 -> -fno-math-errno

2018-03-30 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: cfe-commits, aheejin. The former is not a valid clang argument Repository: rC Clang https://reviews.llvm.org/D45102 Files: include/clang/Basic/Builtins.def Index: include/clang/Basic/Builtins.def

r328895 - [CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr.

2018-03-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 30 12:25:39 2018 New Revision: 328895 URL: http://llvm.org/viewvc/llvm-project?rev=328895=rev Log: [CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr. Sometimes template instantiation causes CXXBindTemporaryExpr to be missing in its usual spot. In

[PATCH] D44955: [CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr.

2018-03-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328895: [CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-30 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 140475. zinovy.nis marked 3 inline comments as done. zinovy.nis added a comment. - Cosmetic fixes. https://reviews.llvm.org/D44295 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt

r328903 - [analyzer] Fix test triple in missing-bind-temporary.cpp.

2018-03-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 30 14:22:35 2018 New Revision: 328903 URL: http://llvm.org/viewvc/llvm-project?rev=328903=rev Log: [analyzer] Fix test triple in missing-bind-temporary.cpp. Otherwise the default triple for x86-windows-msvc2015 auto-inserts __attribute__((thiscall)) to some calls.

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-30 Thread Peter Szecsi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328906: [ASTImporter] Add test helper Fixture (authored by szepet, committed by ). Changed prior to commit: https://reviews.llvm.org/D43967?vs=139791=140497#toc Repository: rC Clang

[PATCH] D45112: [MS] Emit vftable thunks for functions with incomplete prototypes

2018-03-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: rjmccall, rsmith, hans. Herald added a subscriber: Prazek. The following class hierarchy requires that we be able to emit a this-adjusting thunk for B::foo in C's vftable: struct Incomplete; struct A { virtual A* foo(Incomplete p) = 0; };

LLVM buildmaster will be unavailable for shot time after 5:30 pm PST today

2018-03-30 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be unavailable for shot time after 5:30 pm PST today for updates and maintenance. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45112: [MS] Emit vftable thunks for functions with incomplete prototypes

2018-03-30 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. Does this help PR25641? https://reviews.llvm.org/D45112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Buildbot numbers for the week of 3/11/2018 - 3/17/2018

2018-03-30 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 3/11/2018 - 3/17/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to

Buildbot numbers for the week of 3/18/2018 - 3/24/2018

2018-03-30 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the last week of 3/18/2018 - 3/24/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from

[PATCH] D44854: [analyzer] Be more careful about C++17 copy elision.

2018-03-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328893: [CFG] [analyzer] Avoid modeling C++17 constructors that arent fully supported. (authored by dergachev, committed by ). Repository: rL LLVM https://reviews.llvm.org/D44854 Files:

[PATCH] D44854: [analyzer] Be more careful about C++17 copy elision.

2018-03-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328893: [CFG] [analyzer] Avoid modeling C++17 constructors that arent fully supported. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D44295: [clang-tidy] Detects and fixes calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-03-30 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. BTW, I've recently found few dozens of issues in the Chromium code with my check. For ex.: browser/src/cc/layers/nine_patch_layer_impl.cc:89:51: warning: qualified name 'cc::LayerImpl::LayerAsJson' refers to a member overridden in subclass; did you mean

[PATCH] D45117: [analyzer] Fix diagnostics in callees of interesting callees.

2018-03-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. `removeUnneededCalls()` is responsible for removing path diagnostic pieces within functions that don't contain "interesting" events. It is

[PATCH] D45071: [analyzer] Track null or undef values through pointer arithmetic.

2018-03-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 140466. NoQ added a comment. Substraction is an additive operation. Added tests for that. Added even more tests. https://reviews.llvm.org/D45071 Files: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp test/Analysis/inlining/inline-defensive-checks.c

r328893 - [CFG] [analyzer] Avoid modeling C++17 constructors that aren't fully supported.

2018-03-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 30 12:21:18 2018 New Revision: 328893 URL: http://llvm.org/viewvc/llvm-project?rev=328893=rev Log: [CFG] [analyzer] Avoid modeling C++17 constructors that aren't fully supported. Not enough work has been done so far to ensure correctness of construction contexts

[PATCH] D45071: [analyzer] Track null or undef values through pointer arithmetic.

2018-03-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328896: [analyzer] Track null or undef values through pointer arithmetic. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D45071 Files:

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-30 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > I'm not quite sure how we would go about that with confidence. The code we'd > need to catch looks something like: > > typeof(foo() == y) x; > /* snip */ > bar(x == -1); // warning: comparison is pointless > > If we could tell that x's type was inferred from a

r328896 - [analyzer] Track null or undef values through pointer arithmetic.

2018-03-30 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Mar 30 12:27:42 2018 New Revision: 328896 URL: http://llvm.org/viewvc/llvm-project?rev=328896=rev Log: [analyzer] Track null or undef values through pointer arithmetic. Pointer arithmetic on null or undefined pointers results in null or undefined pointers. This is

[PATCH] D45109: Remove -cc1 option "-backend-option"

2018-03-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. Herald added subscribers: eraman, javed.absar, mehdi_amini. It means essentially the same thing as -mllvm; there isn't any reason to have separate options. Repository: rC Clang https://reviews.llvm.org/D45109 Files: include/clang/Driver/CC1Options.td

[PATCH] D45061: [NVPTX, CUDA] Use custom feature detection to handle NVPTX target builtins.

2018-03-30 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 140493. tra added a comment. Commented out unused argument. https://reviews.llvm.org/D45061 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/lib/Basic/Targets/NVPTX.cpp clang/lib/Basic/Targets/NVPTX.h clang/test/CodeGen/builtins-nvptx-ptx50.cu

[PATCH] D45071: [analyzer] Track null or undef values through pointer arithmetic.

2018-03-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:78 +const Expr *peelOffPointerArithmetic(const BinaryOperator *B) { + if (B->isAdditiveOp() && B->getType()->isPointerType()) {

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-30 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. > C89 has no bool type and no stdbool.h but it has been added to later > standards? That means the generalization could theoretically be done for > later C standards, because we could check if the bool typedef had been used? > If yes, would the check benefit?

[PATCH] D45061: [NVPTX, CUDA] Use custom feature detection to handle NVPTX target builtins.

2018-03-30 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 140447. tra added a comment. Removed unneeded function. https://reviews.llvm.org/D45061 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/lib/Basic/Targets/NVPTX.cpp clang/lib/Basic/Targets/NVPTX.h clang/test/CodeGen/builtins-nvptx-ptx50.cu

[PATCH] D18860: [analyzer] Fix the "Zombie symbols" issue.

2018-03-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @NoQ can we get the evaluation re-done? https://reviews.llvm.org/D18860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r328911 - [analyzer] Cache offset computation for MemRegion

2018-03-30 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Mar 30 18:20:07 2018 New Revision: 328911 URL: http://llvm.org/viewvc/llvm-project?rev=328911=rev Log: [analyzer] Cache offset computation for MemRegion Achieves almost a 200% speedup on the example where the performance of visitors was problematic.

[PATCH] D45115: [analyzer] Fix assertion crash in CStringChecker

2018-03-30 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328912: [analyzer] Fix assertion crash in CStringChecker (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D45115

[PATCH] D45113: [analyzer] Cache computation of regionAsOffset

2018-03-30 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328911: [analyzer] Cache offset computation for MemRegion (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D45113

r328912 - [analyzer] Fix assertion crash in CStringChecker

2018-03-30 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Mar 30 18:20:08 2018 New Revision: 328912 URL: http://llvm.org/viewvc/llvm-project?rev=328912=rev Log: [analyzer] Fix assertion crash in CStringChecker An offset might be unknown. rdar://39054939 Differential Revision: https://reviews.llvm.org/D45115

r328910 - [analyzer] Fix liveness calculation for C++17 structured bindings

2018-03-30 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Mar 30 18:20:06 2018 New Revision: 328910 URL: http://llvm.org/viewvc/llvm-project?rev=328910=rev Log: [analyzer] Fix liveness calculation for C++17 structured bindings C++ structured bindings for non-tuple-types are defined in a peculiar way, where the

[PATCH] D44238: [CFG] Fix automatic destructors when a member is bound to a reference.

2018-03-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Seems fine to me, but you might want someone with analyzer experience to review. Repository: rC Clang https://reviews.llvm.org/D44238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45101: [ObjC] Use the name specified by objc_runtime_name instead of the class identifier

2018-03-30 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D45101#1053246, @ahatanak wrote: > Note that CGObjCNonFragileABIMac::EmitClassRef also passes the class > identifier to

r328913 - [analyzer] Hopefully fix the ARM buildbot.

2018-03-30 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Mar 30 19:17:15 2018 New Revision: 328913 URL: http://llvm.org/viewvc/llvm-project?rev=328913=rev Log: [analyzer] Hopefully fix the ARM buildbot. Modified: cfe/trunk/test/Analysis/bstring.c cfe/trunk/test/Analysis/string.c Modified:

[PATCH] D45086: [analyzer] Unroll the loop when it has a unsigned counter.

2018-03-30 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 140524. MTC added a comment. Fix typo, `unsinged` -> `unsigned` Repository: rC Clang https://reviews.llvm.org/D45086 Files: lib/StaticAnalyzer/Core/LoopUnrolling.cpp test/Analysis/loop-unrolling.cpp Index: test/Analysis/loop-unrolling.cpp