diff options
author | luolent <56246516+luolent@users.noreply.github.com> | 2024-05-04 20:38:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-04 18:38:45 +0100 |
commit | a98a6e95be1be9a5c28da15b4d19a6f39872461d (patch) | |
tree | 414af1d920cc1be91c79ff23fded3b4cdf291faa /clang/lib/Basic/Targets/AMDGPU.cpp | |
parent | 028f1b078193b9120ddb441808521b6bd6eaed0e (diff) | |
download | llvm-a98a6e95be1be9a5c28da15b4d19a6f39872461d.zip llvm-a98a6e95be1be9a5c28da15b4d19a6f39872461d.tar.gz llvm-a98a6e95be1be9a5c28da15b4d19a6f39872461d.tar.bz2 |
Add clarifying parenthesis around non-trivial conditions in ternary expressions. (#90391)
Fixes [#85868](https://github.com/llvm/llvm-project/issues/85868)
Parenthesis are added as requested on ternary operators with non trivial conditions.
I used this [precedence table](https://en.cppreference.com/w/cpp/language/operator_precedence) for reference, to make sure we get the expected behavior on each change.
Diffstat (limited to 'clang/lib/Basic/Targets/AMDGPU.cpp')
-rw-r--r-- | clang/lib/Basic/Targets/AMDGPU.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/Targets/AMDGPU.cpp b/clang/lib/Basic/Targets/AMDGPU.cpp index 5742885..cc7be64 100644 --- a/clang/lib/Basic/Targets/AMDGPU.cpp +++ b/clang/lib/Basic/Targets/AMDGPU.cpp @@ -232,7 +232,7 @@ AMDGPUTargetInfo::AMDGPUTargetInfo(const llvm::Triple &Triple, HasLegalHalfType = true; HasFloat16 = true; - WavefrontSize = GPUFeatures & llvm::AMDGPU::FEATURE_WAVE32 ? 32 : 64; + WavefrontSize = (GPUFeatures & llvm::AMDGPU::FEATURE_WAVE32) ? 32 : 64; AllowAMDGPUUnsafeFPAtomics = Opts.AllowAMDGPUUnsafeFPAtomics; // Set pointer width and alignment for the generic address space. |