[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-06-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: Bigcheese, aganea. Herald added subscribers: tschuett, dexonsmith, jkorous, mgorny. Herald added a project: clang. This patch implements the fast dependency scanning mode in `clang-scan-deps`: the preprocessing is done on files that are mi

[PATCH] D63908: hwasan: Improve precision of checks using short granule tags.

2019-06-27 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: eugenis. Herald added subscribers: Sanitizers, cfe-commits, jfb, hiraditya, javed.absar, kubamracek. Herald added projects: clang, Sanitizers, LLVM. A short granule is a granule of size between 1 and `TG-1` bytes. The size of a short granule is sto

[PATCH] D63911: [clang-doc] Serialize child namespaces and records

2019-06-27 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran created this revision. DiegoAstiazaran added reviewers: juliehockett, jakehehrlich, lebedev.ri. DiegoAstiazaran added a project: clang-tools-extra. Serialization of child namespaces and records is now handled. Namespaces can have child records and child namespaces. Records can only

[PATCH] D63912: [ObjC] Add a warning for implicit conversions of a constant non-boolean value to BOOL

2019-06-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, steven_wu. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. erik.pilkington added a reviewer: arphaman. On macOS, BOOL is a typedef for signed char, but it should never hold a value that

[PATCH] D62556: [analyzer] NFC: CallDescription: Implement describing C library functions.

2019-06-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1064 // e.g. "{a, b}" represent the qualified names, like "a::b". std::vector QualifiedName; unsigned RequiredArgs; a_sidorin wrote: > Not for this

[PATCH] D62556: [analyzer] NFC: CallDescription: Implement describing C library functions.

2019-06-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 206978. NoQ marked 4 inline comments as done. NoQ added a comment. Fxd. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62556/new/ https://reviews.llvm.org/D62556 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h clang/lib/Stat

[PATCH] D63911: [clang-doc] Serialize child namespaces and records

2019-06-27 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tools-extra/clang-doc/Serialize.cpp:341 + Parent->USR = ParentUSR; + Parent->ChildNamespaces.emplace_back(I->USR, I->Name, InfoType::IT_namespace); + return {std::unique_ptr{std::move(I)}, You're probably

[PATCH] D52847: [clang-doc] Handle anonymous namespaces

2019-06-27 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 206979. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52847/new/ https://reviews.llvm.org/D52847 Files: clang-tools-extra/clang-doc/Representation.cpp clang-tools-extra/clang-doc/Representation.h clang-tools-extra/clang-doc/Serialize.cpp

[PATCH] D63845: [WIP] Create a clang attribute that lets users specify LLVM attributes

2019-06-27 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D63845#1560605 , @aaron.ballman wrote: > In D63845#1559995 , @lebedev.ri > wrote: > > > What's the target use-case here? What can't be solved with normal > > attributes? > With "no

[PATCH] D63718: [ADT] Implement llvm::bsearch() with std::partition_point()

2019-06-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63718/new/ https://reviews.llvm.org/D63718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D63915: [analyzer][WIP] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-06-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, mgorny. Options: - `apiModeling.Retur

[PATCH] D63915: [analyzer][WIP] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-06-27 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso planned changes to this revision. Charusso marked 2 inline comments as done. Charusso added a comment. Heavily WIP, see inline. Comment at: clang/test/Analysis/return-value-guaranteed.cpp:37 +bool parseFile() { + clang_analyzer_eval(error() == true); // FIXME: xpected

[PATCH] D61809: [BPF] Preserve debuginfo array/union/struct type/access index

2019-06-27 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The new approach to tracking expressions inside of __builtin_preserve_access_index seems okay. Please let @rsmith comment since he looked at this before. Comment at: docs/LanguageExtensions.rst:1958 +array subscript access and structure/union member

[PATCH] D63822: [Driver] Fix style issues of --print-supported-cpus

2019-06-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 206989. MaskRay retitled this revision from "[Driver] Delete --print-supported-cpus in favor of -mcpu=? or -mtune=?" to "[Driver] Fix style issues of --print-supported-cpus". MaskRay added a comment. Repurpose Repository: rC Clang CHANGES SINCE LAST ACT

[PATCH] D63822: [Driver] Fix style issues of --print-supported-cpus

2019-06-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 206993. MaskRay added a comment. Restore a comment Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63822/new/ https://reviews.llvm.org/D63822 Files: include/clang/Driver/Options.td lib/Driver/Driver.cpp lib/Frontend/Comp

[PATCH] D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang

2019-06-27 Thread Justin Hibbits via Phabricator via cfe-commits
jhibbits marked an inline comment as done. jhibbits added inline comments. Comment at: lib/Basic/Targets/PPC.cpp:318 + Features["spe"] = llvm::StringSwitch(CPU) +.Case("e500", true) +.Case("8548", true) vit9696 wro

[PATCH] D63789: [ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

2019-06-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 206992. vsapsai added a comment. Herald added a project: clang. - Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63789/new/ https://reviews.llvm.org/D63789 Files: clang/lib/AST/ODRHas

[PATCH] D63789: [ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

2019-06-27 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu accepted this revision. rtrieu added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63789/new/ https://reviews.llvm.org/D63789 ___

[PATCH] D61809: [BPF] Preserve debuginfo array/union/struct type/access index

2019-06-27 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song marked 2 inline comments as done. yonghong-song added a comment. @rsmith I have proposed one clang intrinsic and three IR intrinsics for CO-RE. Could you take a look and share your opinions as well? Thanks! Comment at: docs/LanguageExtensions.rst:1958 +array subs

[PATCH] D58164: Block+lambda: allow reference capture

2019-06-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I'm not sure we've ever written down what the semantics of the block capture are actually supposed to be in this situation. I guess capturing a reference is the right thing to do? Is that what we generally do if this is a POD type? Repository: rC Clang CHANGES SI

[PATCH] D53295: Mark store and load of block invoke function as invariant.group

2019-06-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Great, thank you. Yaxun, are you planning to pick this back up? I know it's been a long time. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53295/new/ https://reviews.llvm.org/D53295 ___ cfe-commits mailing list

[PATCH] D63139: [Diagnostics] Implement -Wswitch-unreachable

2019-06-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Are the `CaseStmt`s being dropped in C++ because the expression overflows? I agree that that's bad AST behavior; we should strive to generate AST whenever we can, even if it's not valid. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63139/new/ https://review

[PATCH] D62645: [Sema] Resolve placeholder types before type deduction to silence spurious `-Warc-repeated-use-of-weak` warnings

2019-06-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11101 + if (auto *placeholderType = Init->getType()->getAsPlaceholderType()) +if (placeholderType->getKind() == BuiltinType::PseudoObject) { + Res = CheckPlaceholderExpr(Init).get(); -

[PATCH] D63602: [Sanitizers] Don't use clang_rt.sancov_{begin, end} on Solaris

2019-06-27 Thread Rainer Orth via Phabricator via cfe-commits
ro added a comment. Ping? It's been a week and I've since been informed that without it Solaris/SPARC compilation is broken since the `sancov_*` archives don't exit (compiler-rt isn't built on sparc). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63602/new/ htt

[PATCH] D63260: [Attr] Support _attribute__ ((fallthrough))

2019-06-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:1279 continue; - if (S.getLangOpts().CPlusPlus11) { + if (S.getLangOpts().CPlusPlus11 || S.getLangOpts().C99) { const Stmt *Term = B->getTerminatorStmt(); a

[PATCH] D56366: New warning call-to-virtual-from-ctor-dtor when calling a virtual function from a constructor or a destructor

2019-06-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaOverload.cpp:13075 + if ((isa(CurContext) || + isa(CurContext)) && + isa(MemExpr->getBase()->IgnoreParenCasts()) && Intentionally suppressed in lambdas? I think that might be reasonable, but a

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-06-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 206995. ahatanak marked 7 inline comments as done. ahatanak added a comment. Address review comments. Diagnose lvalue-to-rvalue conversion of volatile non-trivial C types. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63753/

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-06-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:633 + "capture a variable of type %1}3 " + "since it %select{contains a union that |}2is non-trivial to " + "%select{default-initialize|destruct|copy}0">; rjmccall wrote: >

[PATCH] D62413: [OpenCL][PR41727] Prevent ICE on global dtors

2019-06-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDeclCXX.cpp:132 + Argument = CGM.getTargetCodeGenInfo().performAddrSpaceCast( + CGM, Addr.getPointer(), SrcAS, LangAS::opencl_global, DestTy); Anastasia wrote: > rjmccall wrote: > > Anastas

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-06-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Sema/Sema.h:2124 +// Implicitly initialized subobject. +NTCUC_ImplicitInitSubObject, +// Uninialized variable with automatic storage duration. "default-initialized", please.

<    1   2