SimplyDanny marked 3 inline comments as done.
SimplyDanny added inline comments.
================
Comment at:
clang-tools-extra/test/clang-tidy/checkers/bugprone-sizeof-expression.cpp:175
// CHECK-MESSAGES: :[[@LINE-1]]:28: warning: suspicious usage of sizeof
pointer 'sizeof(T)/sizeof(T)'
-int Test3() { return Foo<42>() + Bar<char>(); }
+template <__int128_t N>
+bool Baz() { return sizeof(A) < N; }
----------------
aaron.ballman wrote:
> SimplyDanny wrote:
> > aaron.ballman wrote:
> > > aaronpuchert wrote:
> > > > This causes test failures on 32-bit architectures:
> > > > ```
> > > > /home/tcwg-buildbot/worker/clang-armv7-2stage/stage2/tools/clang/tools/extra/test/clang-tidy/checkers/Output/bugprone-sizeof-expression.cpp.tmp.cpp:175:11:
> > > > error: unknown type name '__int128_t' [clang-diagnostic-error]
> > > > template <__int128_t N>
> > > > ^
> > > > ```
> > > >
> > > > It's probably best to wrap this in `#ifdef __SIZEOF_INT128__` lest we
> > > > disable the entire test on the affected platforms.
> > > Good catch! @SimplyDanny, can you fix up the test?
> > Sure. I will fix it. Sorry for the issue ...
> >
> > What is the process in this case? Push the fix directly to main or go the
> > normal path via Phabricator review?
> When fixing a broken test, you can generally push directly to main. (And if
> the fix requires thought, it's usually best to revert the broken commit from
> main until you have the test fixed, then push the fixed commit back to main).
Done. Fix is [[ https://reviews.llvm.org/rGf10cee91ae07 | here ]].
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122544/new/
https://reviews.llvm.org/D122544
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits