Skip to content

Commit c8bd1b8

Browse files
authored
[SYCLomatic] Fix 2 coverity issues. (#2847)
Signed-off-by: Chen, Sheng S <sheng.s.chen@intel.com>
1 parent f654e02 commit c8bd1b8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

clang/lib/Driver/ToolChains/Gnu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3493,7 +3493,7 @@ bool Generic_GCC::addGCCLibStdCxxIncludePaths(
34933493
#ifdef SYCLomatic_CUSTOMIZATION
34943494
// Detect Debian g++-multiarch-incdir.diff through the list of candidate, the
34953495
// potential GCC version sorts in descending orde.
3496-
for (auto Candidate : GCCInstallation.GetCandidateVersion()) {
3496+
for (auto &Candidate : GCCInstallation.GetCandidateVersion()) {
34973497
if (addLibStdCXXIncludePaths(
34983498
LibDir.str() + "/../include/c++/" + Candidate.Text, DebianMultiarch,
34993499
Multilib.includeSuffix(), DriverArgs, CC1Args, /*Debian=*/true))

clang/lib/Serialization/ASTReaderStmt.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3177,6 +3177,7 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) {
31773177

31783178
case EXPR_SYCL_UNIQUE_STABLE_ID:
31793179
S = SYCLUniqueStableIdExpr::CreateEmpty(Context);
3180+
break;
31803181

31813182
case EXPR_OPENACC_ASTERISK_SIZE:
31823183
S = OpenACCAsteriskSizeExpr::CreateEmpty(Context);

0 commit comments

Comments
 (0)