[all-commits] [llvm/llvm-project] ecd1ce: [CLANG] Fix INF/NAN warning. (#80290)
Zahira Ammarguellat via All-commits
all-commits at lists.llvm.org
Tue Feb 6 15:47:09 PST 2024
Branch: refs/heads/release/18.x
Home: https://github.com/llvm/llvm-project
Commit: ecd1cee3e0d7e8bbe7ce98ca81c9c96e1804709c
https://github.com/llvm/llvm-project/commit/ecd1cee3e0d7e8bbe7ce98ca81c9c96e1804709c
Author: Zahira Ammarguellat <zahira.ammarguellat at intel.com>
Date: 2024-02-06 (Tue, 06 Feb 2024)
Changed paths:
M clang/include/clang/Basic/DiagnosticCommonKinds.td
M clang/include/clang/Basic/DiagnosticDocs.td
M clang/include/clang/Lex/Preprocessor.h
M clang/lib/Lex/PPDirectives.cpp
M clang/lib/Lex/PPExpressions.cpp
M clang/test/Sema/warn-infinity-nan-disabled-lnx.cpp
M clang/test/Sema/warn-infinity-nan-disabled-win.cpp
Log Message:
-----------
[CLANG] Fix INF/NAN warning. (#80290)
In https://github.com/llvm/llvm-project/pull/76873 a warning was added
when the macros INFINITY and NAN are used in binary expressions when
-menable-no-nans or -menable-no-infs are used. If the user uses an
option that nullifies these two options, the warning will still be
generated. This patch adds an additional information to the warning
comment to let the user know about this. It also suppresses the warning
when #ifdef INFINITY, #ifdef NAN, #ifdef NAN or #ifndef NAN are used in
the code.
(cherry picked from commit 62c352e13c145b5606ace88ecbe9164ff011b5cf)
More information about the All-commits
mailing list