aaron.ballman added inline comments.
Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:23
+
+const char DefaultIgnoredValues[] = "0;1;2;10;100;";
+
lebedev.ri wrote:
> aaron.ballman wrote:
> > Why 2, 10, and 100?
> These really should be a config option.
T
jgalenson added a comment.
In https://reviews.llvm.org/D49492#1167064, @efriedma wrote:
> Are you sure this will actually do what you want, in general? I suspect it
> will end up missing bounds checks in some cases because it's running it too
> early (before mem2reg/inlining/etc).
No, I'm no
efriedma added a comment.
skipRValueSubobjectAdjustments has to match the rules in `[class.temporary]` in
the standard, which includes skipping over certain explicit casts.
Would it be enough to accumulate the skipped casts into a SmallVector, like we
do for the skipped comma operators?
eugenis added a comment.
ObjectSizeOffsetEvaluator may fail to trace the address back to the underlying
object, and we will end up not inserting the check.
Does ChecksUnable statistic go up with this change?
Repository:
rC Clang
https://reviews.llvm.org/D49492
efriedma added a comment.
This sanitizer has a bit of a strange design compared to other sanitizers; it
tries to compute the size of the base object using the IR at the point the pass
runs. So the later it runs, the more information it has. Trivial example:
static int accumulate(int* foo, i
leonardchan created this revision.
leonardchan added reviewers: phosek, mcgrathr.
leonardchan added a project: clang.
This patch adds the `noderef` attribute in clang and checks for dereferences of
types that have this attribute. This attribute is currently used by sparse and
would like to be po
eugenis added a comment.
Some checks can be removed by asking SCEV for offset bounds, see
SafeStack::IsAccessSafe for an example.
Repository:
rC Clang
https://reviews.llvm.org/D49492
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http:/
dankm added inline comments.
Comment at: lib/Driver/ToolChains/Clang.cpp:609
static void addDebugPrefixMapArg(const Driver &D, const ArgList &Args,
ArgStringList &CmdArgs) {
+ for (const Arg *A : Args.filtered(options::OPT_ffile_prefix_map_EQ)) {
+StringRef Map = A->getVal
0x8000- added inline comments.
Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:23
+
+const char DefaultIgnoredValues[] = "0;1;2;10;100;";
+
aaron.ballman wrote:
> lebedev.ri wrote:
> > aaron.ballman wrote:
> > > Why 2, 10, and 100?
> > These really s
dankm updated this revision to Diff 156164.
dankm retitled this revision from "Initial implementation of -fmacro-prefix-map
and -ffile-prefix-map" to "Initial implementation of -fmacro-prefix-mapand
-ffile-prefix-map".
dankm added a comment.
Address some of the comments by erichkeane and joerg.
akyrtzi added a comment.
Is it possible to add a regression test case ? I assume this is fixing some
issue, we should make sure we don't regress again.
Repository:
rC Clang
https://reviews.llvm.org/D49476
___
cfe-commits mailing list
cfe-commits
jgalenson added a comment.
Good call; I had figured that running it earlier might just impede other
optimizations, but I forgot that it would also hide size information.
I thought this was the easiest approach compared to changing the pass pipeline
or adding extra checks in here. But I hadn't
ldionne added a comment.
ABI-wise, I think this change is OK. Indeed, if `__type_visibility__` is not
supported, we're already marking the base template as
`__visibility__("default")`, so marking the extern template declaration with
`__visibility__("default")` is not a problem. If `__type_visib
leonardchan updated this revision to Diff 156167.
leonardchan added a comment.
- Added checks for expressions in statements other than declarations or
expression statements
Repository:
rC Clang
https://reviews.llvm.org/D49511
Files:
include/clang/AST/Type.h
include/clang/Basic/Attr.td
NoQ added a comment.
Herald added a subscriber: mikhail.ramalho.
There are still performance regressions coming in, and this time it doesn't
look like it's my fault: https://bugs.llvm.org/show_bug.cgi?id=38208
I suspect that this might be because we aren't enforcing complexity thresholds
over a
thomasanderson added a comment.
In https://reviews.llvm.org/D35388#1167305, @ldionne wrote:
> ABI-wise, I think this change is OK. Indeed, if `__type_visibility__` is not
> supported, we're already marking the base template as
> `__visibility__("default")`, so marking the extern template declar
leonardchan updated this revision to Diff 156174.
leonardchan marked 3 inline comments as done.
Repository:
rC Clang
https://reviews.llvm.org/D48661
Files:
include/clang/AST/ASTContext.h
include/clang/Basic/FixedPoint.h
include/clang/Basic/TargetInfo.h
lib/AST/ASTContext.cpp
lib/Basi
arphaman added a comment.
In https://reviews.llvm.org/D48559#1165511, @sammccall wrote:
> In https://reviews.llvm.org/D48559#1165172, @jkorous wrote:
>
> > Hi Sam, thanks for your feedback!
> >
> > In general I agree that explicitly factoring out the transport layer and
> > improving layering wo
ahatanak planned changes to this revision.
ahatanak added a comment.
In https://reviews.llvm.org/D49303#1165902, @rjmccall wrote:
> Please test that we still copy captures correctly into the block object and
> destroy them when the block object is destroyed.
There is a bug in my patch where th
vsapsai added inline comments.
Comment at: clang/lib/Lex/PPDirectives.cpp:1875
+ // Stop further preprocessing if a fatal error has occurred. Any diagnostics
+ // we might have raised will not be visible.
+ if (ShouldEnter && Diags->hasFatalErrorOccurred())
jk
Author: bruno
Date: Wed Jul 18 16:21:19 2018
New Revision: 337430
URL: http://llvm.org/viewvc/llvm-project?rev=337430&view=rev
Log:
Reapply r336660: [Modules] Autoload subdirectory modulemaps with specific
LangOpts
Summary:
Reproducer and errors:
https://bugs.llvm.org/show_bug.cgi?id=37878
look
vsapsai created this revision.
vsapsai added reviewers: bruno, benlangmuir.
Herald added a subscriber: dexonsmith.
Orphaned files prevent us from building a file system tree and cause the
assertion
> Assertion failed: (NewParentE && "Parent entry must exist"), function
> uniqueOverlayTree, file
Author: jdennett
Date: Wed Jul 18 16:21:31 2018
New Revision: 337431
URL: http://llvm.org/viewvc/llvm-project?rev=337431&view=rev
Log:
Documentation: fix a typo in the AST Matcher Reference docs.
Modified:
cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h
Modified: cfe/trunk/include/clang/AS
vsapsai added inline comments.
Comment at: clang/lib/Basic/VirtualFileSystem.cpp:1416
+if (NameValueNode)
+ error(NameValueNode, "file is not located in any directory");
+return nullptr;
Not happy with the error message but didn't come up
ldionne added a comment.
In https://reviews.llvm.org/D35388#1167315, @thomasanderson wrote:
> In https://reviews.llvm.org/D35388#1167305, @ldionne wrote:
>
> > ABI-wise, I think this change is OK. Indeed, if `__type_visibility__` is
> > not supported, we're already marking the base template as
Quuxplusone added inline comments.
Comment at: clang-tidy/readability/MagicNumbersCheck.h:52
+
+ const std::vector IngnoredValuesInput;
+ std::vector IngnoredValues;
`Ignored`. Please spellcheck throughout.
Comment at: docs/clang-tidy/checks/
0x8000- marked 17 inline comments as done.
0x8000- added inline comments.
Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:30-32
+ for (const std::string &IgnoredValue : IngnoredValuesInput) {
+IngnoredValues.push_back(std::stoll(IgnoredValue));
+ }
erik.pilkington updated this revision to Diff 156178.
erik.pilkington marked 5 inline comments as done.
erik.pilkington added a comment.
This revision is now accepted and ready to land.
In this new patch:
- Add support for __builtin_bzero (-Wsuspicious-bzero), improve diagnostics for
platforms t
erik.pilkington added inline comments.
Comment at: clang/lib/Sema/SemaChecking.cpp:7984
+ if (isa(ThirdArg) &&
+ cast(ThirdArg)->getValue() == 0) {
+WarningKind = 0;
Quuxplusone wrote:
> > Suppress the diagnostic in cases like `memset(ptr, 0xff, PADDING
arphaman created this revision.
arphaman added reviewers: jkorous, sammccall, ilya-biryukov.
arphaman added a project: clang-tools-extra.
Herald added subscribers: dexonsmith, MaskRay, ioeric.
This patch builds on top of the "extra flags" extension added in r307241.
It adds the ability to specify
arphaman added a comment.
Btw, the "extraFlags" extension is still usable with "compilationCommand".
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D49523
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/
yaxunl updated this revision to Diff 156184.
yaxunl marked 4 inline comments as done.
yaxunl added a comment.
Added comments about thread safety of ctor functions.
https://reviews.llvm.org/D49083
Files:
lib/CodeGen/CGCUDANV.cpp
test/CodeGenCUDA/device-stub.cu
Index: test/CodeGenCUDA/device
0x8000- marked 8 inline comments as done.
0x8000- added inline comments.
Comment at: docs/clang-tidy/checks/readability-magic-numbers.rst:33
+
+ return -3; // FILENOTFOUND
+ }
Quuxplusone wrote:
> I notice you changed `-1` to `-3`. Is `return -1` n
ahatanak added a comment.
ping
Repository:
rC Clang
https://reviews.llvm.org/D45898
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
0x8000- added a comment.
I think this requires a separate discussion - do we accept magic values only
when they are used directly to initialize a constant of the same type? Or do we
allow them generically when they are used to initialize any constant? Or do we
only accept several layers of
emmettneyman created this revision.
emmettneyman added reviewers: morehouse, kcc.
Herald added subscribers: cfe-commits, mgorny.
Herald added a reviewer: alexshap.
Made changes to the llvm-proto-fuzzer
- Added loop vectorizer optimization pass in order to have two IR versions
- Updated old fuzz t
emmettneyman added a comment.
The files
Object.h
Object.cpp
llvm-objcopy.h
are from llvm/tools/llvm-obj-copy with only slight modifications, mostly
deleting irrelevant parts.
Repository:
rC Clang
https://reviews.llvm.org/D49526
___
cfe-c
Author: manojgupta
Date: Wed Jul 18 17:44:52 2018
New Revision: 337433
URL: http://llvm.org/viewvc/llvm-project?rev=337433&view=rev
Log:
[clang]: Add support for "-fno-delete-null-pointer-checks"
Summary:
Support for this option is needed for building Linux kernel.
This is a very frequently reque
This revision was automatically updated to reflect the committed changes.
Closed by commit rC337433: [clang]: Add support for
"-fno-delete-null-pointer-checks" (authored by manojgupta, committed
by ).
Changed prior to commit:
https://reviews.llvm.org/D47894?vs=155891&id=156195#toc
Repository:
pcc added inline comments.
Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:209
+
+// Helper function that converts ELF relocatable into raw machine code that
+// can be executed in memory. Returns size of machine code.
Did you look at using LLVM'
phosek updated this revision to Diff 156201.
phosek marked 2 inline comments as done.
Repository:
rCXX libc++
https://reviews.llvm.org/D49502
Files:
libcxx/CMakeLists.txt
libcxx/cmake/Modules/HandleLibCXXABI.cmake
libcxx/lib/CMakeLists.txt
libcxxabi/CMakeLists.txt
libcxxabi/src/CMake
phosek added inline comments.
Comment at: libcxx/lib/CMakeLists.txt:269
+AND (TARGET cxxabi_static OR HAVE_LIBCXXABI))
+#if ((TARGET ${LIBCXX_CXX_ABI_LIBRARY}) OR
+#(${LIBCXX_CXX_ABI_LIBRARY} MATCHES "cxxabi(_static|_shared)?" AND
HAVE_LIBCXXABI))
---
vsapsai added a comment.
Need to double check what tests we have when using relative path names at the
root level. I'd like to make the behavior consistent because a file name is a
specific case of relative paths. So far there are no assertions and no errors
but file lookup doesn't seem to be w
0x8000- updated this revision to Diff 156203.
0x8000- added a comment.
Herald added subscribers: kbarton, nemanjai.
Significant refactoring to address review comments - mainly to reduce
duplication and implement in functional style.
cppcoreguidelines-avoid-magic-numbers is documented as
0x8000- added a comment.
Any plans for fix-its that will add the suggested 'const' qualifiers?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45444
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cg
0x8000- marked an inline comment as done.
0x8000- added inline comments.
Comment at: test/clang-tidy/readability-magic-numbers.cpp:16
+void BuggyFunction() {
+ int BadLocalInt = 6;
+ // CHECK-MESSAGES: :[[@LINE-1]]:21: warning: magic number integer literal 6
[readabili
malaperle added a comment.
Interesting! We also have a need for passing compilation commands in a context
where there is no compile_commands.json, but we were thinking of putting this
in a "didChangeConfiguration" message so that all the commands would be
available even before files are opened.
rjmccall added a comment.
Thanks for the comment.
Comment at: lib/CodeGen/CGCUDANV.cpp:444
+auto HandleValue =
+CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign());
+llvm::Constant *Zero =
llvm::Constant::getNullValue(HandleValue->getType());
rjmccall added inline comments.
Comment at: include/clang/Basic/FixedPoint.h:64
+
+class APFixedPoint {
+ public:
rjmccall wrote:
> This should get a documentation comment describing the class. You should
> mention that, like `APSInt`, it carries all of the sem
rjmccall added a comment.
I think it would be reasonable to set a flag on `ImplicitCastExpr`s that are
actually semantically part of an explicit cast. I don't think that would be
hard to get Sema to do, either by passing a flag down to the code that builds
those casts or just by retroactively
Quuxplusone updated this revision to Diff 156210.
Quuxplusone edited the summary of this revision.
Quuxplusone added a comment.
Remove some incorrect `noexcept` from ``.
I noticed this because the calls to `__clang_call_terminate` showed up on
Godbolt. But the pessimization is still there even w
lebedev.ri added a comment.
In https://reviews.llvm.org/D49508#1167177, @efriedma wrote:
> skipRValueSubobjectAdjustments has to match the rules in `[class.temporary]`
> in the standard, which includes skipping over certain explicit casts.
I'm this approach because this is what @rsmith suggest
gaijiading added a comment.
In https://reviews.llvm.org/D46230#1167023, @echristo wrote:
> In https://reviews.llvm.org/D46230#1166958, @gaijiading wrote:
>
> > In https://reviews.llvm.org/D46230#1166919, @echristo wrote:
> >
> > > LGTM.
> > >
> > > -eric
> >
> >
> > Hi Eric, I do not have commit
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D41938#1167313, @NoQ wrote:
> There are still performance regressions coming in, and this time it doesn't
> look like it's my fault: https://bugs.llvm.org/show_bug.cgi?id=38208
>
> I suspect that this might be because we aren't enfo
101 - 154 of 154 matches
Mail list logo