[all-commits] [llvm/llvm-project] 2ddf0c: [clang][driver] Suppress gnu-line-marker when savi...

macurtis-amd via All-commits all-commits at lists.llvm.org
Tue Jun 10 09:55:12 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ddf0caaed192495cac99e703cef2fe50191cf49
      https://github.com/llvm/llvm-project/commit/2ddf0caaed192495cac99e703cef2fe50191cf49
  Author: macurtis-amd <macurtis at amd.com>
  Date:   2025-06-10 (Tue, 10 Jun 2025)

  Changed paths:
    M clang/lib/Frontend/InitPreprocessor.cpp
    A clang/test/Preprocessor/line-directive-suppressed.c

  Log Message:
  -----------
  [clang][driver] Suppress gnu-line-marker when saving temps (#134621)

When passing `-save-temps` to clang, the generated preprocessed output
uses gnu line markers. This unexpectedly triggers gnu-line-marker
warnings when used with `-Weverything` or `-pedantic`. Even worse,
compilation fails if `-Werror` is used.

This change suppresses gnu-line-marker warnings when invoking clang with
input from a preprocessor job and the user has not otherwise explictly
specified `-Wgnu-line-marker` somewhere on the command line. Note that
this does apply to user provided preprocessed files.

fixes #63802



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list