[PATCH] D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer.

2018-09-21 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 166595. shuaiwang marked 5 inline comments as done. shuaiwang added a comment. Addresses review comments. Repository: rC Clang https://reviews.llvm.org/D52219 Files: include/clang/Analysis/Analyses/ExprMutationAnalyzer.h lib/Analysis/ExprMutationAn

[PATCH] D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer.

2018-09-21 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang marked 10 inline comments as done. shuaiwang added inline comments. Comment at: lib/Analysis/ExprMutationAnalyzer.cpp:86 +// - Pointer to non-const +// - Pointer-like type with `operator*` returning non-const reference +bool isPointeeMutable(const Expr *Exp, const ASTCo

r342794 - Update smart pointer detection for thread safety analysis.

2018-09-21 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Sep 21 18:50:52 2018 New Revision: 342794 URL: http://llvm.org/viewvc/llvm-project?rev=342794&view=rev Log: Update smart pointer detection for thread safety analysis. Objects are determined to be smart pointers if they have both a star and arrow operator. Some implementa

[PATCH] D51867: [Diagnostics] Add error handling to FormatDiagnostic()

2018-09-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. It seems like there are too many asserts and they are too specific, they seem to be aimed at specific potential bugs. What about asserts that make sure we maintain some invariants? For example, check `DiagStr < DiagEnd` once in a loop instead of every place we increment

[PATCH] D51789: [clang] Add the exclude_from_explicit_instantiation attribute

2018-09-21 Thread Louis Dionne via Phabricator via cfe-commits
ldionne updated this revision to Diff 166590. ldionne added a comment. Fix warnings on undefined entities Repository: rC Clang https://reviews.llvm.org/D51789 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaDec

Re: r342793 - [Lexer] Add udefined_behavior_sanitizer feature

2018-09-21 Thread Leonard Chan via cfe-commits
My bad. I saw that Vitaly accepted it and thought it would be ok since I got 2 LGTMs. On Fri, Sep 21, 2018 at 6:21 PM Aaron Ballman wrote: > > The reviewer asked you to wait a day so that others might have a > chance to review it, so this commit seems premature. I have no > technical concerns with

Re: r342793 - [Lexer] Add udefined_behavior_sanitizer feature

2018-09-21 Thread Aaron Ballman via cfe-commits
The reviewer asked you to wait a day so that others might have a chance to review it, so this commit seems premature. I have no technical concerns with the patch, but the sanitizer owners should have had a chance to weigh in. That said, I don't see value in reverting and recommitting later, so if t

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-09-21 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342793: [Lexer] Add udefined_behavior_sanitizer feature (authored by leonardchan, committed by ). Repository: rL LLVM https://reviews.llvm.org/D52386 Files: include/clang/Basic/Features.def test/L

r342793 - [Lexer] Add udefined_behavior_sanitizer feature

2018-09-21 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Fri Sep 21 18:03:16 2018 New Revision: 342793 URL: http://llvm.org/viewvc/llvm-project?rev=342793&view=rev Log: [Lexer] Add udefined_behavior_sanitizer feature This can be used to detect whether the code is being built with UBSan using the __has_feature(undefined_behavio

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-09-21 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342793: [Lexer] Add udefined_behavior_sanitizer feature (authored by leonardchan, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52386?vs=166

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-09-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM but you should probably a wait a day to see if sanitizer owners are fine with with this as well. Repository: rC Clang https://reviews.llvm.org/D52386 __

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-09-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: phosek, kcc, echristo, vitalybuka, morehouse. leonardchan added a project: clang. This can be used to detect whether the code is being built with UBSan using the __has_feature(undefined_behavior_sanitizer) predicate. Repository:

[PATCH] D51809: [CUDA][HIP] Fix assertion in LookupSpecialMember

2018-09-21 Thread Justin Lebar via Phabricator via cfe-commits
jlebar requested changes to this revision. jlebar added subscribers: timshen, rsmith. jlebar added a comment. This revision now requires changes to proceed. Sorry for missing tra's ping earlier, I get a lot of HIP email traffic that's 99% inactionable by me, so I didn't notice my username in tra'

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:31 +static bool singleNamedNamespaceChild(const NamespaceDecl &ND) { + const NamespaceDecl::decl_range Decls = ND.decls(); + if (std::distance(Decls.begin(), Decls.end()) != 1)

[PATCH] D47687: [Sema] Missing -Wlogical-op-parentheses warnings in macros (PR18971)

2018-09-21 Thread Xing via Phabricator via cfe-commits
Higuoxing updated this revision to Diff 166583. Higuoxing added a comment. I update the *SuggestParentheses* function, now, it could deal with parentheses inside macros https://reviews.llvm.org/D47687 Files: lib/Sema/SemaExpr.cpp test/Sema/parentheses.c Index: test/Sema/parentheses.c

[PATCH] D52384: [Sema] Fix redeclaration contexts for enumerators in C

2018-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, dblaikie. In C, enumerators are not hoisted into, say, a struct decl context when the enumeration is declared inside of a struct. Instead, the enumerators are hoisted into the translation unit decl context. This patch fi

[PATCH] D51789: [clang] Add the exclude_from_explicit_instantiation attribute

2018-09-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4683-4686 + "Member '%0' marked with 'exclude_from_explicit_instantiation' attribute is " + "not defined but an explicit template instantiation declaration exists. " + "Reliance on this

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/SemaType.cpp:1682 // or via one or more typedefs." -if (!S.getLangOpts().C99 && !S.getLangOpts().CPlusPlus -&& TypeQuals & Result.getCVRQualifiers()) { srhines wrote: > This is broken fo

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 166578. nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. - also run test on gnu99+ Repository: rC Clang https://reviews.llvm.org/D52248 Files: lib/Sema/SemaType.cpp test/Sema/gnu89-const.c Index: test/Sema/

[PATCH] D52344: [Clang][CodeGen][ObjC]: Fix non-bridged CoreFoundation builds on ELF targets that use `-fconstant-cfstrings`.

2018-09-21 Thread Kristina Brooks via Phabricator via cfe-commits
kristina marked 2 inline comments as done. kristina added a comment. Binary layout also looks sane (compiled with `-fPIC -faddrsig -Wl,--icf=safe`), just digging it through it in a dissasembler: [/q/src/clwn]$ llvm-readobj -elf-output-style=GNU -sections /q/org.llvm.caches/clownschool/clwn-sy

r342790 - Thread safety analysis: Make printSCFG compile again [NFC]

2018-09-21 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Fri Sep 21 16:46:35 2018 New Revision: 342790 URL: http://llvm.org/viewvc/llvm-project?rev=342790&view=rev Log: Thread safety analysis: Make printSCFG compile again [NFC] Not used productively, so no observable functional change. Note that printSCFG doesn't yet work re

[PATCH] D52344: [Clang][CodeGen][ObjC]: Fix non-bridged CoreFoundation builds on ELF targets that use `-fconstant-cfstrings`.

2018-09-21 Thread Kristina Brooks via Phabricator via cfe-commits
kristina updated this revision to Diff 166576. kristina added a comment. Does this look about right? I'm not sure what's up with DSO local attribute, it doesn't seem to apply, I think this test makes sense though. `ninja check-clang-codegen` succeeded this time: Testing Time: 12.77s Expec

r342789 - Fix codemodels.c test case (only test mcmodel-kernel on x86)

2018-09-21 Thread Caroline Tice via cfe-commits
Author: ctice Date: Fri Sep 21 16:19:49 2018 New Revision: 342789 URL: http://llvm.org/viewvc/llvm-project?rev=342789&view=rev Log: Fix codemodels.c test case (only test mcmodel-kernel on x86) A recent commit I made broke aarch64 testing, because "kernel" apparently is not a valid code-model on a

r342787 - Thread safety analysis: Make sure FactEntrys stored in FactManager are immutable [NFC]

2018-09-21 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Fri Sep 21 16:08:30 2018 New Revision: 342787 URL: http://llvm.org/viewvc/llvm-project?rev=342787&view=rev Log: Thread safety analysis: Make sure FactEntrys stored in FactManager are immutable [NFC] Since FactEntrys are stored in the FactManager, we can't manipulate th

[PATCH] D51187: [RFC] Thread safety analysis: Track status of scoped capability

2018-09-21 Thread Delesley Hutchins via Phabricator via cfe-commits
delesley added a comment. In https://reviews.llvm.org/D51187#1241354, @aaronpuchert wrote: > Thanks for pointing out my error! Ignoring the implementation for a moment, > do you think this is a good idea or will it produce too many false positives? > Releasable/relockable scoped capabilities th

r342774 - Make compare function in r342648 have strict weak ordering.

2018-09-21 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Sep 21 14:20:33 2018 New Revision: 342774 URL: http://llvm.org/viewvc/llvm-project?rev=342774&view=rev Log: Make compare function in r342648 have strict weak ordering. Comparison functions used in sorting algorithms need to have strict weak ordering. Remove the assert an

[PATCH] D51812: Simplify CheckFallThroughForBody

2018-09-21 Thread Geoffrey Romer via Phabricator via cfe-commits
gromer added a comment. OK, the diffs are now un-borked. Sorry for the flailing incompetence. https://reviews.llvm.org/D51812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52377: [HIP] Support early finalization of device code

2018-09-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Overall the patch look OK. I'll take a closer look on Monday. Which mode do you expect will be most commonly used for HIP by default? With this patch we'll have two different ways to do similar things in HIP vs. CUDA. E.g. by default CUDA compiles GPU code in each TU in a co

[PATCH] D51812: Simplify CheckFallThroughForBody

2018-09-21 Thread Geoffrey Romer via Phabricator via cfe-commits
gromer updated this revision to Diff 166558. https://reviews.llvm.org/D51812 Files: b/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp Index: b/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp === --- b/llvm/tools/clang/lib/

[PATCH] D52344: [Clang][CodeGen][ObjC]: Fix non-bridged CoreFoundation builds on ELF targets that use `-fconstant-cfstrings`.

2018-09-21 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D52344#1242530, @rjmccall wrote: > In https://reviews.llvm.org/D52344#1242451, @kristina wrote: > > > Would you be okay with me renaming `cfstring` to `.cfstring` for ELF so > > it's in line with ELF section naming conventions (I'm not entirel

[PATCH] D52377: [HIP] Support early finalization of device code

2018-09-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 166556. yaxunl added a comment. Fix comments. https://reviews.llvm.org/D52377 Files: include/clang/Driver/Options.td include/clang/Driver/Types.def lib/CodeGen/CGCUDANV.cpp lib/Driver/Driver.cpp lib/Driver/ToolChains/Clang.cpp lib/Driver/ToolChai

[PATCH] D52344: [Clang][CodeGen][ObjC]: Fix non-bridged CoreFoundation builds on ELF targets that use `-fconstant-cfstrings`.

2018-09-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a reviewer: theraven. rjmccall added a comment. In https://reviews.llvm.org/D52344#1242451, @kristina wrote: > Would you be okay with me renaming `cfstring` to `.cfstring` for ELF so it's > in line with ELF section naming conventions (I'm not entirely sure if that > could cause i

[PATCH] D51812: Simplify CheckFallThroughForBody

2018-09-21 Thread Geoffrey Romer via Phabricator via cfe-commits
gromer updated this revision to Diff 166545. https://reviews.llvm.org/D51812 Files: B/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp Index: B/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp === --- B/llvm/tools/clang/lib/

[PATCH] D52338: [analyzer] Process state in checkEndFunction in RetainCountChecker

2018-09-21 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342770: [analyzer] Process state in checkEndFunction in RetainCountChecker (authored by george.karpenkov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D52337: [analyzer] Highlight sink nodes in red in exploded graph

2018-09-21 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342769: [analyzer] Highlight sink nodes in red (authored by george.karpenkov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52337?vs=166400&

[PATCH] D52337: [analyzer] Highlight sink nodes in red in exploded graph

2018-09-21 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342769: [analyzer] Highlight sink nodes in red (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D52337?vs=166400&i

[PATCH] D52326: [analyzer] Associate diagnostics created in checkEndFunction with a return statement, if possible

2018-09-21 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342768: [analyzer] Associate diagnostics created in checkEndFunction with a return… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https:

[PATCH] D52338: [analyzer] Process state in checkEndFunction in RetainCountChecker

2018-09-21 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342770: [analyzer] Process state in checkEndFunction in RetainCountChecker (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews

[PATCH] D52269: [analyzer] [NFC] Dead code removal

2018-09-21 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342765: [analyzer] [NFC] Dead code removal (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D52269?vs=166143&id=16

r342770 - [analyzer] Process state in checkEndFunction in RetainCountChecker

2018-09-21 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Sep 21 13:37:20 2018 New Revision: 342770 URL: http://llvm.org/viewvc/llvm-project?rev=342770&view=rev Log: [analyzer] Process state in checkEndFunction in RetainCountChecker Modify the RetainCountChecker to perform state "adjustments" in checkEndFunction, as pe

r342768 - [analyzer] Associate diagnostics created in checkEndFunction with a return statement, if possible

2018-09-21 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Sep 21 13:36:41 2018 New Revision: 342768 URL: http://llvm.org/viewvc/llvm-project?rev=342768&view=rev Log: [analyzer] Associate diagnostics created in checkEndFunction with a return statement, if possible If not possible, use the last line of the declaration,

r342769 - [analyzer] Highlight sink nodes in red

2018-09-21 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Sep 21 13:37:01 2018 New Revision: 342769 URL: http://llvm.org/viewvc/llvm-project?rev=342769&view=rev Log: [analyzer] Highlight sink nodes in red Differential Revision: https://reviews.llvm.org/D52337 Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.

r342767 - [analyzer] [NFC] Prefer make_unique over "new"

2018-09-21 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Sep 21 13:36:21 2018 New Revision: 342767 URL: http://llvm.org/viewvc/llvm-project?rev=342767&view=rev Log: [analyzer] [NFC] Prefer make_unique over "new" Differential Revision: https://reviews.llvm.org/D52336 Modified: cfe/trunk/lib/StaticAnalyzer/Checker

r342766 - [analyzer] Fix bug in isInevitablySinking

2018-09-21 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Sep 21 13:36:01 2018 New Revision: 342766 URL: http://llvm.org/viewvc/llvm-project?rev=342766&view=rev Log: [analyzer] Fix bug in isInevitablySinking If the non-sink report is generated at the exit node, it will be suppressed by the current functionality in isIn

r342765 - [analyzer] [NFC] Dead code removal

2018-09-21 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Sep 21 13:35:39 2018 New Revision: 342765 URL: http://llvm.org/viewvc/llvm-project?rev=342765&view=rev Log: [analyzer] [NFC] Dead code removal Differential Revision: https://reviews.llvm.org/D52269 Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/BugRe

[PATCH] D52377: [HIP] Support early finalization of device code

2018-09-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. This patch introduced a driver option `--hip-early-finalize`. When enabled, clang will assume the device code in each translation unit does not call external functions except those in the device library, therefore it is possible to compil

[PATCH] D52344: [Clang][CodeGen][ObjC]: Fix non-bridged CoreFoundation builds on ELF targets that use `-fconstant-cfstrings`.

2018-09-21 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Would you be okay with me renaming `cfstring` to `.cfstring` for ELF so it's in line with ELF section naming conventions (I'm not entirely sure if that could cause issues with ObjC stuff)? And yes I think it's best to avoid that code-path altogether if it turns out to

[PATCH] D45639: [Driver] Support default libc++ library location on Darwin

2018-09-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In https://reviews.llvm.org/D45639#1193112, @ldionne wrote: > @phosek I don't understand how you can expect code compiled with new headers > to link against an old dylib, unless you're setting the target platform, in > which case anything that would fail to link will ins

[PATCH] D52368: [libc++abi] is_strcmp parameter to is_equal is unused for WIN32

2018-09-21 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342764: [libc++abi] is_strcmp parameter to is_equal is unused for WIN32 (authored by pirama, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52368

[PATCH] D52344: [Clang][CodeGen][ObjC]: Fix non-bridged CoreFoundation builds on ELF targets that use `-fconstant-cfstrings`.

2018-09-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:4108 + // consistent with old behavior for this target as it would fail + // on the cast<> instead. + assert(GV && "isa isn't a GlobalValue"); compnerd wrote: > I think that

[PATCH] D52368: [libc++abi] is_strcmp parameter to is_equal is unused for WIN32

2018-09-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM. Repository: rCXXA libc++abi https://reviews.llvm.org/D52368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

Re: r342734 - NFC: deduplicate isRepeatedBytePattern from clang to LLVM's isBytewiseValue

2018-09-21 Thread Nico Weber via cfe-commits
Hello, please add linebreaks to your commit messages. This commit makes `git log` look pretty ugly. On Fri, Sep 21, 2018 at 9:55 AM JF Bastien via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: jfb > Date: Fri Sep 21 06:54:09 2018 > New Revision: 342734 > > URL: http://llvm.org/viewvc

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-21 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml marked 2 inline comments as done. wgml added inline comments. Comment at: clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp:52 +const NamespaceContextVec &Namespaces) { + std::ostringstream Result; + bool First = true; aaron.ballman wrote: > Can thi

[PATCH] D52136: [clang-tidy] Add modernize-concat-nested-namespaces check

2018-09-21 Thread Wojtek Gumuła via Phabricator via cfe-commits
wgml updated this revision to Diff 166529. wgml marked 4 inline comments as done. wgml edited the summary of this revision. https://reviews.llvm.org/D52136 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ConcatNestedNamespacesCheck.cpp clang-tidy/modernize/ConcatNestedNamesp

[PATCH] D52313: [clang-doc] Avoid parsing undefined base classes

2018-09-21 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 166526. juliehockett added a comment. Adding test case https://reviews.llvm.org/D52313 Files: clang-tools-extra/clang-doc/Serialize.cpp clang-tools-extra/test/clang-doc/bc-record.cpp clang-tools-extra/test/clang-doc/mapper-record.cpp clang-tool

[PATCH] D52368: [libc++abi] is_strcmp parameter to is_equal is unused for WIN32

2018-09-21 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama updated this revision to Diff 166527. pirama added a comment. Simplify patch. Repository: rCXXA libc++abi https://reviews.llvm.org/D52368 Files: src/private_typeinfo.cpp Index: src/private_typeinfo.cpp === --- src/pri

[PATCH] D52344: [Clang][CodeGen][ObjC]: Fix non-bridged CoreFoundation builds on ELF targets that use `-fconstant-cfstrings`.

2018-09-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. This looks fine to me, but this definitely should have an accompanying test. As to the other items you mention, the current section naming actually is important as it enables the CFString

[PATCH] D52323: Add necessary support for storing code-model to module IR.

2018-09-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342758: Add necessary support for storing code-model to module IR. (authored by ctice, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52323?v

r342758 - Add necessary support for storing code-model to module IR.

2018-09-21 Thread Caroline Tice via cfe-commits
Author: ctice Date: Fri Sep 21 11:34:59 2018 New Revision: 342758 URL: http://llvm.org/viewvc/llvm-project?rev=342758&view=rev Log: Add necessary support for storing code-model to module IR. Currently the code-model does not get saved in the module IR, so if a code model is specified when compili

[PATCH] D51812: Simplify CheckFallThroughForBody

2018-09-21 Thread Geoffrey Romer via Phabricator via cfe-commits
gromer added inline comments. Comment at: b/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp:601 +case MaybeFallThrough: + if (ReturnsValue) +S.Diag(RBrace, diag::warn_maybe_falloff_nonvoid_coroutine) rsmith wrote: > This `if` and the one belo

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added reviewers: jlebar, Anastasia. erik.pilkington added subscribers: jlebar, Anastasia. erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/Features.def:233 EXTENSION(cxx_variadic_templates, LangOpts.CPlusPlus) +EXTENSION(cxx_fixed_enum

[PATCH] D51812: Simplify CheckFallThroughForBody

2018-09-21 Thread Geoffrey Romer via Phabricator via cfe-commits
gromer updated this revision to Diff 166521. gromer marked 2 inline comments as done. https://reviews.llvm.org/D51812 Files: B/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp Index: B/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp ==

[PATCH] D52268: [AST] Squeeze some bits in LinkageComputer

2018-09-21 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv accepted this revision. george.burgess.iv added a comment. LGTM too. Thanks again! Repository: rC Clang https://reviews.llvm.org/D52268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. > There's no reason to make this an `ObjC2`-only feature; we should probably > eliminate that distinction throughout the compiler. Sure, I was just writing a proposal to do that: http://lists.llvm.org/pipermail/cfe-dev/2018-September/059468.html Repository:

[PATCH] D52368: [libc++abi] is_strcmp parameter to is_equal is unused for WIN32

2018-09-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This seems like overkill to me; why not add `(void) use_strcmp` right before line 67 instead? Repository: rCXXA libc++abi https://reviews.llvm.org/D52368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D50229: [ARM][AArch64] Add feature +fp16fml

2018-09-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D50229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D52339#1242241, @aaron.ballman wrote: > In https://reviews.llvm.org/D52339#1242202, @erik.pilkington wrote: > > > From the last line in the paper, it seems that C++ compatibility is a goal > > of the paper (or at least a consideration). We sh

[PATCH] D52268: [AST] Squeeze some bits in LinkageComputer

2018-09-21 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/D52268#1241793, @riccibruno wrote: > In https://reviews.llvm.org/D52268#1241033, @rjmccall wrote: > > > `LinkageComputer` isn't actually persisted anywhere, righ

[PATCH] D52321: [CUDA] Fixed parsing of optional template-argument-list.

2018-09-21 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342752: [CUDA] Fixed parsing of optional template-argument-list. (authored by tra, committed by ). Changed prior to commit: https://reviews.llvm.org/D52321?vs=166509&id=166512#toc Repository: rC Clan

r342752 - [CUDA] Fixed parsing of optional template-argument-list.

2018-09-21 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Sep 21 10:46:28 2018 New Revision: 342752 URL: http://llvm.org/viewvc/llvm-project?rev=342752&view=rev Log: [CUDA] Fixed parsing of optional template-argument-list. We need to consider all tokens that start with '>' when we're checking for the end of an empty template argume

[PATCH] D52323: Add necessary support for storing code-model to module IR.

2018-09-21 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D52323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D52339#1242202, @erik.pilkington wrote: > From the last line in the paper, it seems that C++ compatibility is a goal of > the paper (or at least a consideration). We should probably think about this > if/when the final wording gets acce

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/include/clang/Basic/Features.def:90 FEATURE(objc_default_synthesize_properties, LangOpts.ObjC2) -FEATURE(objc_fixed_enum, LangOpts.ObjC2) +FEATURE(objc_fixed_enum, true) FEATURE(objc_instancetype, LangOpts.ObjC2)

[PATCH] D52321: [CUDA] Fixed parsing of optional template-argument-list.

2018-09-21 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 166509. tra added a comment. Added '>=' and '>>=' to the list of tokens that may indicate the end of the empty template argument list. https://reviews.llvm.org/D52321 Files: clang/lib/Parse/ParseTemplate.cpp clang/test/Parser/cuda-kernel-call-c++11.cu cla

r342750 - [NFC] remove unused variable

2018-09-21 Thread JF Bastien via cfe-commits
Author: jfb Date: Fri Sep 21 10:38:41 2018 New Revision: 342750 URL: http://llvm.org/viewvc/llvm-project?rev=342750&view=rev Log: [NFC] remove unused variable It was causing a warning. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp UR

[PATCH] D52368: [libc++abi] is_strcmp parameter to is_equal is unused for WIN32

2018-09-21 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama created this revision. pirama added reviewers: EricWF, srhines, mstorsjo. Herald added subscribers: libcxx-commits, ldionne, christof. Mark it as unused to avoid -Wunused-parameter. Repository: rCXXA libc++abi https://reviews.llvm.org/D52368 Files: src/private_typeinfo.cpp Index:

[PATCH] D51808: [CUDA] Ignore uncallable functions when we check for usual deallocators.

2018-09-21 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342749: [CUDA] Ignore uncallable functions when we check for usual deallocators. (authored by tra, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In https://reviews.llvm.org/D52339#1242126, @aaron.ballman wrote: > In https://reviews.llvm.org/D52339#1242118, @jfb wrote: > > > In https://reviews.llvm.org/D52339#1242103, @aaron.ballman wrote: > > > > > In https://reviews.llvm.org/D52339#1242086, @jfb wrote: >

r342749 - [CUDA] Ignore uncallable functions when we check for usual deallocators.

2018-09-21 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Sep 21 10:29:33 2018 New Revision: 342749 URL: http://llvm.org/viewvc/llvm-project?rev=342749&view=rev Log: [CUDA] Ignore uncallable functions when we check for usual deallocators. Previously clang considered function variants from both sides of compilation and that resulted

[PATCH] D52281: [clang-tidy] Add modernize check to use std::invoke in generic code

2018-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:27-32 + // template + // void f(T func) { + // func(); + // ^~~ + // ::std::invoke(func, 1) + Finder->addMatcher(callExpr(has(declRefExpr())).bind("functor"),

[PATCH] D52296: [Clang] - Add -gsingle-file-split-dwarf option.

2018-09-21 Thread George Rimar via Phabricator via cfe-commits
grimar added a comment. To summarise: - It shares most of the benefits with the .dwo solution. - Unlike .dwo, there is no need to split the file and it is friendlier to other tools (ccache, distcc, etc) - But unlike .dwo a distributed build system has to copy larger .o files. https://reviews.l

[PATCH] D52321: [CUDA] Fixed parsing of optional template-argument-list.

2018-09-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Parse/ParseTemplate.cpp:949-950 GreaterThanIsOperatorScope G(GreaterThanIsOperator, false); -if (Tok.isNot(tok::greater) && Tok.isNot(tok::

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D52339#1242118, @jfb wrote: > In https://reviews.llvm.org/D52339#1242103, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D52339#1242086, @jfb wrote: > > > > > I think we should consider proposing this to the C committee. > > > @

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D52339#1242103, @aaron.ballman wrote: > In https://reviews.llvm.org/D52339#1242086, @jfb wrote: > > > I think we should consider proposing this to the C committee. > > @aaron.ballman I can help Erik write the paper, would you be able to > > prese

[PATCH] D52323: Add necessary support for storing code-model to module IR.

2018-09-21 Thread Caroline Tice via Phabricator via cfe-commits
cmtice updated this revision to Diff 166492. cmtice edited the summary of this revision. cmtice added a comment. Move include statement from CodeGenModule.h to CodeGenModule.cpp Remove incorrect "default" case statement. Add test for "tiny" code model. https://reviews.llvm.org/D52323 Files:

[PATCH] D52323: Add necessary support for storing code-model to module IR.

2018-09-21 Thread Caroline Tice via Phabricator via cfe-commits
cmtice marked an inline comment as done. cmtice added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:569 + .Default(~0u); +if ((CM != ~0u) && (CM != ~1u)) { + llvm::CodeModel::Model codeModel = static_cast(CM); tejohnson wro

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D52339#1242086, @jfb wrote: > I think we should consider proposing this to the C committee. @aaron.ballman > I can help Erik write the paper, would you be able to present it? Too tight > for the upcoming meeting, but I'm guessing we hav

[PATCH] D52364: [clangd] Initial supoprt for cross-namespace global code completion.

2018-09-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. When no scope qualifier is specified, allow completing index symbols from any scope and insert proper automatically. This is still experime

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I think we should consider proposing this to the C committee. @aaron.ballman I can help Erik write the paper, would you be able to present it? Too tight for the upcoming meeting, but I'm guessing we have *plenty* of time for ++C17. Repository: rC Clang https://reviews.l

[PATCH] D52047: [clangd] Add building benchmark and memory consumption tracking

2018-09-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall requested changes to this revision. sammccall added a comment. This revision now requires changes to proceed. This change does several things, and I think most of them need further thought. Can we discuss Monday? Comment at: clang-tools-extra/clangd/benchmarks/IndexB

[PATCH] D52323: Add necessary support for storing code-model to module IR.

2018-09-21 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Note that if you add a line like: "Depends on https://reviews.llvm.org/D52322"; in the summary that Phabricator will automatically link the two in the right way. Comment at: lib/CodeGen/CodeGenModule.cpp:569 + .Default(~0u); +if

[PATCH] D52300: [clangd] Implement VByte PostingList compression

2018-09-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D52300#1241754, @kbobyrev wrote: > I addressed the easiest issues. I'll try to implement separate storage > structure for `Head`s and `Payload`s which would potentially make the > implementation cleaner and easier to understand (and also mo

[PATCH] D52047: [clangd] Add building benchmark and memory consumption tracking

2018-09-21 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:78 +static void DexQueries(benchmark::State &State) { + const auto Dex = buildDex(); Why did we move this benchmark (`DexQueries`)? It seems unnecessary. ===

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. Whoops, that acceptance was accidental. Pretending I want changes just to make it clear in Phab. :-) Repository: rC Clang https://reviews.llvm.org/D52339 ___

[PATCH] D52339: Support enums with a fixed underlying type in all language modes

2018-09-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I really like this idea in general, thank you for proposing this patch! Comment at: clang/include/clang/Basic/Fea

r342741 - [OPENMP] Disable emission of the class with vptr if they are not used in

2018-09-21 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Sep 21 07:55:26 2018 New Revision: 342741 URL: http://llvm.org/viewvc/llvm-project?rev=342741&view=rev Log: [OPENMP] Disable emission of the class with vptr if they are not used in target constructs. Prevent compilation of the classes with the virtual tables when compili

[PATCH] D52300: [clangd] Implement VByte PostingList compression

2018-09-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/PostingList.cpp:29 + DecompressedChunk = ChunkIndex->decompress(); + InnerIndex = begin(DecompressedChunk); +} sammccall wrote: > nit: we generally use members (Decompres

[PATCH] D52084: [clangd] Improve PostingList iterator string representation

2018-09-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev closed this revision. kbobyrev added a comment. I think this one is addressed in the VByte patch, so I'm closing this revision in order to prevent conflicts between these two. https://reviews.llvm.org/D52084 ___ cfe-commits mailing list cf

[PATCH] D52357: [clangd] Force Dex to respect symbol collector flags

2018-09-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166482. kbobyrev marked 2 inline comments as done. https://reviews.llvm.org/D52357 Files: clang-tools-extra/clangd/index/dex/Dex.cpp clang-tools-extra/unittests/clangd/DexTests.cpp Index: clang-tools-extra/unittests/clangd/DexTests.cpp

[PATCH] D52047: [clangd] Add building benchmark and memory consumption tracking

2018-09-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 166481. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. - Be more explicit about the nature of "benchmarks" with memory tracking logic via `State::SetLabel(...)`. - Force single iteration for "benchmarks" with memory usage tracking - Add

  1   2   >