[PATCH] D73425: [PPC] Fix platform definitions when compiling FreeBSD powerpc64 as LE

2020-01-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Herald added a subscriber: wuzish. At a minimum, `test/Driver/freebsd.c` and `test/Preprocessor/init-ppc64.c` should be updated for `powerpcle-unknown-freebsd` tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D73203: [clang-tidy] Prevent a remove only fixit causing a conflict when enclosed by another fixit

2020-01-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. We need tests for that. There should be tests for the exporting-feature. Maybe they could provide a good starting point on adding tests. (not sure if there is unit-test code for isolated testing, but some tests do exist!) Repository: rG LLVM Github Monorepo

[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240400. njames93 added a comment. - Address nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73098/new/ https://reviews.llvm.org/D73098 Files:

[PATCH] D73425: [PPC] Fix platform definitions when compiling FreeBSD powerpc64 as LE

2020-01-25 Thread Brandon Bergren via Phabricator via cfe-commits
Bdragon28 created this revision. Bdragon28 added a project: PowerPC. Herald added subscribers: cfe-commits, steven.zhang, shchenz, jsji, krytarowski, arichardson, nemanjai, emaste. Herald added a project: clang. As a prerequisite to doing experimental buids of pieces of FreeBSD PowerPC64 as

[PATCH] D72553: [clang-tidy] Add performance-prefer-preincrement check

2020-01-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Yeah, the libc++ failures are not your fault :) My 2 cents added. Comment at: clang-tools-extra/clang-tidy/performance/PreferPreIncrementCheck.cpp:63 + + if (!getLangOpts().CPlusPlus || !TransformCxxOpCalls) +return; Why would

[PATCH] D72553: [clang-tidy] Add performance-prefer-preincrement check

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240402. njames93 marked 5 inline comments as done. njames93 added a comment. - Address some nits, more test cases need adding though Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/

[PATCH] D72553: [clang-tidy] Add performance-prefer-preincrement check

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/PreferPreIncrementCheck.cpp:63 + + if (!getLangOpts().CPlusPlus || !TransformCxxOpCalls) +return; JonasToth wrote: > Why would you deactivate the check for c-code? > I

[PATCH] D73418: [WPD] Emit vcall_visibility metadata for MicrosoftCXXABI

2020-01-25 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. I fixed the test matching as I found that the names generated for the anonymous namespace comdats depend on the module identifier in some way. I changed the matching to look at the struct type embedded in the initializer, which is also more intuitive. I also moved

[PATCH] D73418: [WPD] Emit vcall_visibility metadata for MicrosoftCXXABI

2020-01-25 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 240395. tejohnson added a comment. Improve test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73418/new/ https://reviews.llvm.org/D73418 Files: clang/lib/CodeGen/MicrosoftCXXABI.cpp

[PATCH] D72810: [LifetimeAnalysis] Add support for lifetime annotations on functions

2020-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the work on this! Comment at: clang/include/clang/AST/LifetimeAttr.h:24 +/// An abstract memory location that participates in defining a lifetime +/// contract. A lifetime contract constrains lifetime of a +///

[PATCH] D72553: [clang-tidy] Add performance-prefer-preincrement check

2020-01-25 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 62197 tests passed, 1 failed and 815 were skipped. failed: libc++.std/thread/thread_mutex/thread_mutex_requirements/thread_timedmutex_requirements/thread_timedmutex_class/lock.pass.cpp {icon times-circle

[clang] 713562f - [Concepts] Transform constraints of non-template functions to ConstantEvaluated

2020-01-25 Thread Saar Raz via cfe-commits
Author: Saar Raz Date: 2020-01-25T23:00:24+02:00 New Revision: 713562f54858f10bf8998ee21ff2c7e7bad0d177 URL: https://github.com/llvm/llvm-project/commit/713562f54858f10bf8998ee21ff2c7e7bad0d177 DIFF: https://github.com/llvm/llvm-project/commit/713562f54858f10bf8998ee21ff2c7e7bad0d177.diff

[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-25 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 62196 tests passed, 0 failed and 815 were skipped. {icon check-circle color=green} clang-tidy: pass. {icon check-circle color=green} clang-format: pass. Build artifacts

[PATCH] D65994: Extended FPOptions with new attributes

2020-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, but I'll echo what @rjmccall said about this level of granularity being a bit too fine for review for future patches (we expect changes to be testable, which this is, but

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp:28 this); - // This matcher used to find structs defined in source code within typedefs. + // This matcher`s used to find structs/enums defined in

[PATCH] D72448: [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

2020-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp:58 + } + if (B.isInvalid() || E.isInvalid()) +return llvm::None; Should we be worried about macros here? It looks a bit like we're

[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some minor nits. Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:340 +return false; + if

[PATCH] D73007: [Sema] Avoid Wrange-loop-analysis false positives

2020-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D73007#1839648 , @aaronpuchert wrote: > Here is a proposal: we add two children to `-Wrange-loop-analysis`. > > - `-Wrange-loop-construct` warns about possibly unintended constructor calls. > This might be in `-Wall`.

[PATCH] D73380: [clang] Annotating C++'s `operator new` with more attributes

2020-01-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri marked 2 inline comments as done. lebedev.ri added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14361 +/// attributes are applied to declarations. +void Sema::AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction( +FunctionDecl *FD) {

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240371. njames93 added a comment. - Remove unnecessary duplicated code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files:

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 62128 tests passed, 5 failed and 807 were skipped. failed: libc++.std/language_support/cmp/cmp_partialord/partialord.pass.cpp failed: libc++.std/language_support/cmp/cmp_strongeq/cmp.strongeq.pass.cpp

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This is what gets flagged when ran on clang/lib with CheckAnyHeader enabled (with it disabled it just goes crazy as a lot of clang headers files seem to share a source file for implementation) clang/lib

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 62128 tests passed, 5 failed and 807 were skipped. failed: libc++.std/language_support/cmp/cmp_partialord/partialord.pass.cpp failed: libc++.std/language_support/cmp/cmp_strongeq/cmp.strongeq.pass.cpp

[PATCH] D72362: [clang-tidy] misc-no-recursion: a new check

2020-01-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Herald added a subscriber: Charusso. In D72362#1819243 , @bader wrote: > In D72362#1817682 , @lebedev.ri > wrote: > > > In D72362#1817599 ,

[PATCH] D73408: [Clang][Bundler] Add 'exclude' flag to target objects sections

2020-01-25 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev created this revision. sdmitriev added a reviewer: ABataev. Herald added a reviewer: alexshap. Herald added a reviewer: jdoerfert. Herald added a project: clang. Herald added a subscriber: cfe-commits. This flag tells link editor to exclude section from linker inputs when linking

[PATCH] D73388: NFC: Implement AST node skipping in ParentMapContext

2020-01-25 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D73388#1840100 , @rsmith wrote: > This seems reasonable to me. > > If you want to unify something about this and the `Ignore*` functions in > `Expr`, maybe we could add a "classify" mechanism, so you could ask "what > kind

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. Flags variables and functions with external linkage that don't have a declaration in the corresponding header file. Repository: rG LLVM Github Monorepo

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 62128 tests passed, 5 failed and 807 were skipped. failed: libc++.std/language_support/cmp/cmp_partialord/partialord.pass.cpp failed: libc++.std/language_support/cmp/cmp_strongeq/cmp.strongeq.pass.cpp

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240372. njames93 added a comment. - fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt

[PATCH] D72634: [clangd] Improve ObjC property handling in SelectionTree.

2020-01-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 240377. sammccall added a comment. more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72634/new/ https://reviews.llvm.org/D72634 Files: clang-tools-extra/clangd/Selection.cpp

[PATCH] D73418: [WPD] Emit vcall_visibility metadata for MicrosoftCXXABI

2020-01-25 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added a reviewer: evgeny777. Herald added a subscriber: Prazek. Herald added a project: clang. The MicrosoftCXXABI uses a separate mechanism for emitting vtable type metadata, and thus didn't pick up the change from D71907

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 62128 tests passed, 5 failed and 807 were skipped. failed: libc++.std/language_support/cmp/cmp_partialord/partialord.pass.cpp failed: libc++.std/language_support/cmp/cmp_strongeq/cmp.strongeq.pass.cpp

[clang-tools-extra] d085634 - [clangd] Make Notification a little safer.

2020-01-25 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-01-25T15:31:55+01:00 New Revision: d08563486e06df3ddb4d7c1018d1e1e762690ee8 URL: https://github.com/llvm/llvm-project/commit/d08563486e06df3ddb4d7c1018d1e1e762690ee8 DIFF: https://github.com/llvm/llvm-project/commit/d08563486e06df3ddb4d7c1018d1e1e762690ee8.diff

[PATCH] D72508: [clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()

2020-01-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:624 + /*IsDecl=*/false, + // Select the getter, setter, or @property depending on the call. + explicitReferenceTargets(DynTypedNode::create(*E), {})});

[PATCH] D72508: [clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()

2020-01-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 240378. sammccall marked 5 inline comments as done. sammccall added a comment. more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72508/new/ https://reviews.llvm.org/D72508 Files:

[PATCH] D72634: [clangd] Improve ObjC property handling in SelectionTree.

2020-01-25 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 62195 tests passed, 0 failed and 815 were skipped. {icon check-circle color=green} clang-tidy: pass. {icon check-circle color=green} clang-format: pass. Build artifacts

[PATCH] D72508: [clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()

2020-01-25 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 62194 tests passed, 1 failed and 815 were skipped. failed: libc++.std/thread/thread_mutex/thread_mutex_requirements/thread_mutex_requirements_mutex/thread_mutex_recursive/try_lock.pass.cpp {icon check-circle

[PATCH] D72331: OpaquePtr: add type to inalloca attribute.

2020-01-25 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. @rnk mind taking a look at this when you get a chance just to sanity check from the inalloca design side of things? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72331/new/ https://reviews.llvm.org/D72331 ___

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240373. njames93 added a comment. - Ignores implicit template instantiations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files:

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. So, i'm seeing an issue here: https://godbolt.org/z/KM2qLa I can't `NOLINT` it, because it is defined not in the source file, but in compile line. And i can't whitelist it since there is no whitelist.. PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/MissingHeaderFileDeclarationCheck.cpp:14 +#include "llvm/ADT/Optional.h" +#include "llvm/ADT/StringSwitch.h" +#include Please also include StringRef. Comment

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240375. njames93 marked 3 inline comments as done. njames93 added a comment. - Address nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files:

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 62128 tests passed, 5 failed and 807 were skipped. failed: libc++.std/language_support/cmp/cmp_partialord/partialord.pass.cpp failed: libc++.std/language_support/cmp/cmp_strongeq/cmp.strongeq.pass.cpp

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D72378#1840353 , @lebedev.ri wrote: > So, i'm seeing an issue here: > https://godbolt.org/z/KM2qLa > > I can't `NOLINT` it, because it is defined not in the source file, but in > compile line. > And i can't whitelist

[clang] 0f34ea5 - [perf-training] Update ' (in-process)' prefix handling

2020-01-25 Thread Francis Visoiu Mistrih via cfe-commits
Author: Francis Visoiu Mistrih Date: 2020-01-25T09:14:24-08:00 New Revision: 0f34ea5dc3cb3efea12dac1fa28b4d3db0cebc75 URL: https://github.com/llvm/llvm-project/commit/0f34ea5dc3cb3efea12dac1fa28b4d3db0cebc75 DIFF:

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240387. njames93 added a comment. - Warn extern declarations in source files Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files:

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D72378#1840455 , @aaron.ballman wrote: > In D72378#1840353 , @lebedev.ri > wrote: > > > So, i'm seeing an issue here: > > https://godbolt.org/z/KM2qLa > > > > I can't `NOLINT` it,

[PATCH] D71566: New checks for fortified sprintf

2020-01-25 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6d485ff455ea: Improve static checks for sprintf and __builtin___sprintf_chk (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D72378#1840461 , @lebedev.ri wrote: > In D72378#1840455 , @aaron.ballman > wrote: > > > In D72378#1840353 , @lebedev.ri > > wrote: > > >

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-25 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 62128 tests passed, 5 failed and 807 were skipped. failed: libc++.std/language_support/cmp/cmp_partialord/partialord.pass.cpp failed: libc++.std/language_support/cmp/cmp_strongeq/cmp.strongeq.pass.cpp