LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 35803 - Assertion `Loc.isValid()' failed with recently added fuchsia-overloaded-operator check
Summary: Assertion `Loc.isValid()' failed with recently added fuchsia-overloaded-opera...
Status: RESOLVED FIXED
Alias: None
Product: clang-tools-extra
Classification: Unclassified
Component: clang-tidy (show other bugs)
Version: unspecified
Hardware: PC Linux
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-03 03:47 PST by Volker Reichelt
Modified: 2018-01-03 14:19 PST (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2018-01-03 03:47:49 PST
Running the command
  clang-tidy -checks='-*,fuchsia-overloaded-operator' bug.cc --
on the following valid code snippet

============================================================
void operator delete (void*, void*) throw();
============================================================

triggers the following assertion:

clang-tidy: /llvm/tools/clang/tools/extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:193: clang::DiagnosticBuilder clang::tidy::ClangTidyContext::diag(llvm::StringRef, clang::SourceLocation, llvm::StringRef, clang::DiagnosticIDs::Level): Assertion `Loc.isValid()' failed.
Abort (core dumped)

This makes the switch -checks='*' completely unusable because this will
trigger with most system STL-headers as they use '#include <new>' at some
point from which the above snippet was extracted.
Comment 1 Julie Hockett 2018-01-03 14:19:51 PST
Fixed in https://reviews.llvm.org/rCTE321762.